Conditional Blocks

Every line in the script is presumably a command to be sent to the device, except for lines that denote either a beginning or ending of a conditional block.

The begin conditional block marker is tied to a Attribute and has the following syntax:

<optional-open-delimiter> IF optional-attribute <optional-close-delimiter>

The end conditional block marker has the following syntax:

<optional-open-delimiter> ENDIF optional-text < optional-close-delimiter>

Here is an example of a conditional block, where the Attribute delimiters are <>, optional delimiter is [], and the conditional Attribute variable is set:

[IF set]

execute this command

and execute this command

[ENDIF set]

If the Attribute set has a value then the block is evaluated; otherwise, it is ignored. The text after ENDIF., that is set or whatever is not required and it is ignored.

Nested conditional blocks are allowed.