[thechat] Anybody Remember IIF?

spinhead evolt at spinhead.com
Thu Sep 6 11:36:53 CDT 2001

Ah; the conditional operator in JavaScript

var drink= (age=="old_enough") ? "beer" : "buttermilk";

Same general format in Excel



----- Original Message -----
From: "Luther, Ron" <Ron.Luther at compaq.com>
To: <thechat at lists.evolt.org>
Sent: Thursday, September 06, 2001 6:31 AM
Subject: RE: [thechat] Anybody Remember IIF?

> Hi Joe | Joel,
> Joe had it correct.  The "immediate if" syntax was an "IIF(condition, true
> thing, false thing)".  e.g. IIF(Len(TN_Input) < 10, Message = "Too Small
> be a phone number", Message = "Thanks - I'll call!")   {COULD be a 'mem
> fault' - but I don't remember having to type the screwy IIf case mixture.)
> Here's an MS article on "rolling your own" in ASP:
> http://support.microsoft.com/support/kb/articles/Q219/2/71.asp
> I keep thinking it might have been a command available in WATFOR or
> back around 1980, maybe? - but I couldn't find it.  There is a stirring in
> the old gray matter that I may have abused it to write some spectacularly
> reprehensible spaghetti code ... the handful of examples I've been able to
> find show a use of the command as above to set a variable value ...
> I'm pretty sure you were allowed to put things like "GOTO 300, GOTO 700"
> your 'true' and 'false' expressions - which means you get to create
> code chunks, improper loop exits and entrances, and all kinds of wonderful
> things to pass on to someone else to maintain.  Hmmmm ... I wonder if
> more an explanation of why we can't use this command anymore - or a
> confession of why I liked the little bugger?   ;-)
> I DID find a reference to an old, deprecated, "arithmetic if" function in
> on-line FORTRAN77 manual, (An "on-line" FORTRAN77 manual??? Dare we ask
> "Why?"), which had a form of "IF (expression) label1, label2, label3"
> would provide a branch to the appropriate label if the expression
> to negative, zero, or positive.   Naturally, this command supports similar
> kinds of baaaaad programming practices.
> RonL. - Who's put way too much time into researching this nonsense ... Yes
> folks, It's definitely time to come up with some NEW nonsense!
> _______________________________________________
> thechat mailing list
> thechat at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/thechat
> http://lists.evolt.org/thechatarchive/
> ________________
> "It's Friday.  Yeah! - only two more working days til Monday - Woooo!"

More information about the thechat mailing list