if, elseif, else, endif

The if, elseif, else and endif commands allow conditional execution of your action commands. These conditional statements operate on expressions in curly brackets as in the following schematic:

if {EXPR1} 
      statements to execute on EXPR1 = TRUE 
elseif {EXPR2} 
      statements to execute on EXPR1 != TRUE and EXPR2 = TRUE 
else 
      statements to execute when EXPR1 != TRUE and EXPR2 != TRUE 
endif 

In the action schematic above, if the expression in curly brackets following the if statement is true, the following statements (up to the endif statement) are evaluated. If blocks can be nested any number of levels deep.

Normal if block semantics are enforced. All statements up to an endif, elseif or else constitute a block. The elseif {EXPR} and else statements are optional. Any number of elseif statements may be used, but only one trailing else block.