List of expression elements / Comparison operators |
The IIF() operator returns the second or third parameter according to the boolean expression given as first argument.
IIF( bool-expr, true-expr, false-expr)
The IIF() operator evaluates the first argument, the returns the second argument if the first argument is true, otherwise it returns the third argument. This allows you to write the equivalent of the following IF statement, in a simple scalar expression:
IF bool-expr THEN RETURN true-expr ELSE RETURN false-expr END IF
MAIN DEFINE var VARCHAR(10) LET var = arg_val(1) DISPLAY IIF(var == "A", "Accepted", "Rejected") END MAIN