The <<if...>> function provides the if-then-else logic to the SDML. This is the most common decision making mechanism within any language. The <<if>> function receives a single argument, which it evaluates as being either true or false. If the argument is true, its first expression, trueExpression, is returned. Otherwise, the falseExpression value is returned. This expression must be preceded by the keyword else. falseExpression is optional and if it is not present, the else keyword cannot appear either.
This function can be used to return something as basic as a single word, or as complex as an entire SQL statement. The contents of either expression can contain SDML text as well. In the case where there is no else portion, and the boolArg is false, the return value of the <<if...>> function is an empty string.