What does the "iif" acronym mean?

iif(expression,true result, false result)

myvar = iif(1 > 2, "yes", "no")

myvar will equal "no"
 
Note, in C# it is the ?: operator. Its kind of wierd.
C#:
String desc;

desc = (5 > 7) ? "greater" : "less";
MessageBox.Show("5 is " + desc + " than 7");
It works like this:

<var> = <expression> ? <true part> : <false part>
 
the syntax can be confusing if youve never seen it before. I think its the only tertiary operator there is, in C# at least.
 
Back
Top