Specifications

5.1 ST
5.1.3 Syntax in ST language
5-5
5
WRITING
PROGRAMS
(2) IF THEN conditional syntax
(a) Format
(b) Description
The syntax is executed when the value of Boolean expression (conditional expression)
is TRUE. The syntax is not executed if the value of Boolean expression is FALSE.
Any expression that returns TRUE or FALSE as the result of the Boolean operation with
a single bit type variable status, or a complicated expression that includes many
variables can be used for the Boolean expression.
(c) Example
(3) IF ...ELSE conditional syntax
(a) Format
(b) Description
Syntax 1 is executed when the value of Boolean expression (conditional expression) is
TRUE.
Syntax 2 is executed when the value of Boolean expression is FALSE.
(c) Example
IF <Boolean expression> THEN
<Syntax ...>;
END_IF;
IF <Boolean expression> THEN
<Syntax 1 ...>;
ELSE
<Syntax 2 ...>;
END_IF;