#if EXPR1 then EXPR2 else EXPR3#
#if flow-control directive (section 9.4) has a
one-line counterpart akin to Perl's and C's
EXPR1 is true, it evaluates
EXPR2 and outputs the result (just
#echo EXPR2#). Otherwise it evaluates
EXPR3 and outputs
that result. This directive is short-circuiting, meaning the expression that
isn't needed isn't evaluated.
You MUST include both 'then' and 'else'. If this doesn't work for you or you
don't like the style use multi-line
#if directives (section
# is the normal end-of-directive character. As usual
it may be omitted if there's nothing after the directive on the same line.