IF (expression) GOTO
If an expression evaluates to TRUE, branch to label.
Syntax
IF ( <expression> ) GOTO <label>
Arguments
<expression> is the CBS expression that must evaluate to TRUE.
<label> is the name of the label to branch to if <expression> evaluates to TRUE.
Description
Use this command to conditionally branch to a label if an expression evaluates to TRUE. If the expression evaluates to FALSE the next statement below the IF...GOTO is executed.
Example
IF ( dDate > Today() ) GOTO AllOK
Echo('Date is greater than current date.')
:AllOK
* Jump to here if dDate less than or equal to Today()
The
expression to evaluate must be surrounded by round brackets.