Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

IIF( )

Action: Returns one of two values depending on the value of a logical expression.
 
Syntax: IIF (expression, returnvalue1, returnvalue2)
 
Parameters: Expression

Specifies the logical expression that IIF( ) evaluates.

ReturnValue1

If expression evaluates to true, ReturnValue1 is returned by IIF.

ReturnValue2

If expression evaluates to false, ReturnValue2 is returned by IIF.

Returns: ReturnValue1 or ReturnValue2, depending on the expression.
 
See Also: IF ... Else ... EndIf, Select ... Case ... EndSelect
 
Example:

$Array=-3,-2,-1,1,2,3
FOR EACH $Element IN $Array
   ? IIF($Element > 0, "Positive", "Negative")
ENDIF