ABB ST语言编程(8)
时间:2025-07-06
时间:2025-07-06
13.3.5ConditionalStructures
There aretwo main groups of conditional structures:IF…Then
OperatorIFBoolean Expression THEN
Statement(s);
END_IF;
IF
ELSE
Statement(s);
END_IF;
IFBoolean Expression 1 THEN
Statement(s);
ELSIFBoolean Expression 2 THEN
Statement(s);
ELSIFBoolean Expression n THEN
Statement(s);
ELSE
Statement(s);
END_IF;then the Statement(s) before the first ELSIFis/are executed. If this condition is false thenthe subsequent Boolean Condition is testedand so on for each ELSIF. If no expression istruethen the ELSE statement(s) execute.The ELSE clause is optional. You may haveas many ELSIF clauses as you wish.Boolean Expression THENStatement(s);then the Statement(s)before the ELSE is/areexecuted. Else the statements after the ELSEand before the END_IF are executed.nly If) the Boolean Expressionevaluates to True, then the Statement(s)between the IF and END_IF is/are executed.
NOTE!A conditional statement is always concluded withEND_IF;
Chapter13-8
上一篇:小学二年级平移练习题