[thechat] Anybody Remember IIF?

deke web at master.gen.in.us
Wed Sep 5 16:00:41 CDT 2001

On 5 Sep 2001, at 15:03, Luther, Ron posted a message which said:

> I was greeted with blank stares and even some laughter.  Which [I have
> to say] surprised and shocked the heck out of me. {Gosh - maybe I really
> am THAT old!}  No one else there had ever heard of "iif"!
> I'm quite sure that I've used boatloads of the little buggers somewhere
> in the distant past.  But where?  A google search turned up home grown
> functions to add "iif" to delphi and/or ASP code. [Even an MS link
> claiming it was an oversight to leave it out of VB!] (The delphi link
> claimed it came from "C" - but I never did much with "C".)
> Sorry - my cerebellum is fused at the moment.  Was "iif" an old Fortran
> stand-by?  Or maybe used in a few dozen of the old 8-bit languages? 

I think it originated in MBASIC. 

In c, you write B = A?C:D;

The old FORTRAN language only had 
    if (var) n1,n2, n3 
depending on your value of "old". Depending on whether var
was negative, zero, or positive, you would go to the appropriate
line number. I'm sure newer versions of FORTRAN have more
options - there is a tendency to add the kitchen sink to every
language except possibly c - but I don't know if they have an
IIF yet.

IIF is part of the dBase language, but I think MBASIC was first.
I'm not sure if CBASIC ever had it, and I don't know about IBM
ROM BASIC because I never had an IBM-brand PC. 



> (There was also an "if and only if" ... but that's on old "math thing".
> I think it was written "iff" and usually used in conjunction with a
> bunch of upside-down capital letter "A"s ["for any"] and backwards
> italic capital letter "E"s ["there exists"].)
> RonL. - apparently just another "old guy" rambling and muttering to
> himself today!  Gosh!
> _______________________________________________
> 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!"

 "The church is near but the road is icy; 
  the bar is far away but I will walk carefully." 
                            -- Russian Proverb

More information about the thechat mailing list