Node: $IFELSE, Next: , Previous: $IFNDEF, Up: Built-in functions



$IFELSE: Two-way conditional

The syntax of this built-in primitive is $IFELSE(expr1, expr2, action-if-equal, action-if-not-equal). The expansions of expr1 and expr2 are compared on a byte-by-byte basis. If they are equal, the first action is taken, otherwise the second action is taken.

For example,

     $M(S="abc")@%
     $IFELSE("abc", S, yes, no)
     

evaluates to yes.