Next: , Previous: , Up: Built-in functions   [Contents][Index]


7.2.3.27 $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’.