Option 3.2.1.3. Conditional Tokens

Conditional tokens enable the user to add if-then-else conditionals in ASCII forms.

The IF conditional token is a combination of tokens as shown below.

Conditional

Description

Basic

If <condition>

The condition part of the IF statement must contain a Boolean solve (testItem) which returns TRUE or FALSE from the solve engine.

 

TRUE

<Statement1> will be used for the broadcast

 

FALSE

<Statement2> will be used in the broadcast.

THEN <Statement 1>

Must use a new line.

ELSE
<
Statement 2>

(ELSE is optional) If used,ELSE and <Statement 2> must each use a new line.

 

Must use a new line.

ENDIF

Must use a new line.

 

Example

IF <condition>

THEN<statement1> - (set of other general purpose tokens or data purpose tokens)

ELSE

<statement2> - (set of other general purpose tokens or data purpose tokens) 1>

ENDIF

Optional

AND <Condition N>

Must use a new line.

Any number of Boolean solves may be used in the condition part.

OR <Condition N>

Must use a new line.

Any number of Boolean solves may be used in the condition part.

 

Example

IF <SOLVENAME1>

OR <SOLVENAME2>

THEN

      TEXT “RED”

ELSE

TEXT “BLACK”

ENDIF

Note: You can create nested conditional tokens; there is no limit on number of nested if statements.

Example: Basic Conditional

More information

Step 3.2.1. Use pre-defined tokens.