NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

3.3.2 Conditional statements

Each of the conditional compilation expressions within a single conditional compilation statement group is evaluated in textual order from first to last until one of the expressions evaluates to True. All lines enclosed by the group are disabled except for lines between the statement containing the True expression and the next conditional statement of the group, or between the else statement and the end statement if an else appears in the group and all of the expressions evaluate to False.

The constant expression is evaluated and then converted to Boolean. If the expression is not convertible to Boolean, an error results.

ConditionalIfGroup ::=
 # If ConstantExpression [ Then ] LineTerminator
 [ ConditionalElement+ ]
 
[ ConditionalElseIfGroup+ ]
 [ ConditionalElseGroup ]
 # End If LineTerminator
ConditionalElseIfGroup ::=
 # ElseIf ConstantExpression [ Then ] LineTerminator
 [ ConditionalElement+ ]
ConditionalElseGroup ::=
 # Else LineTerminator
 [ ConditionalElement+ ]