Description
The ELSE instruction always comes after an IF...THEN, ELSIF...THEN or CASE instruction.
If the ELSE instruction comes after an IF or ELSIF instruction, the instruction
or group of instructions will only be executed if the associated Boolean
expressions of the IF and ELSIF instruction
are 0 (false). If the condition of the IF or ELSIF instruction is 1 (true), the instruction or group
of instructions will not be executed.
If the ELSE instruction comes after CASE, the instruction or
group of instructions will only be executed if no tag contains the
value of the selector. If an identification contains the value of
the selector, the instruction or group of instructions will not be
executed.
NOTE: Any number of
IF...THEN...ELSE...END_IF instructions may be nested to generate complex selection instructions.Example ELSE
IF A>B THEN
C:=SIN(A) * COS(B) ;
B:=C - A ;
ELSE
C:=A + B ;
B:=C * A ;
END_IF ;
