17.16.5.26 IF
-
field-argument-1: expression
-
field-argument-2: expression
Description: Compares the values designated by the expressions in comparison using the operator designated by comparison-operator.
[Note: comparison-operator can be any one of the six relational and equality operators specified for operator (17.16.3.3). end note]
If comparison-operator is = or <>, the left-hand expression operand can contain a question mark (?) to represent any single character, or an asterisk (*) to represent any string of characters.
Field Value: field-argument-1 if the comparison is true; otherwise, field-argument-2.
Switches: None.
[Example: The following example specifies that if the customer order is greater than or equal to 100 units, the result is “Thanks”; but if the customer order is fewer than 100 units, the result is “The minimum order is 100 units”:
{IF order >= 100 "Thanks" "The minimum order is 100 units" }
For other examples, see 17.16.2, and the COMPARE field (17.16.5.10) and the QUOTE field (17.16.5.48). end example]
Syntax: