CASE OF ELSE END_CASE
Statement - switch between enumerated statements.
Syntax
CASE <DINT expression> OF
<value> :
<statements>
<value> , <value> :
<statements>;
<value> .. <value> :
<statements>;
ELSE
<statements>
END_CASE;
Remarks
All enumerated values correspond to the evaluation of the DINT expression and are possible cases in the execution of the statements. The statements specified after the ELSE keyword are executed if the expression takes a value that is not enumerated in the switch. For each case, you must specify either a value, or a list of possible values separated by comas (",") or a range of values specified by a "min .. max" interval. You must enter space characters before and after the ".." separator.
ST Language
|
This example checks the first prime numbers: |
FBD Language
Not available.
LD Language
Not available.
CASE OF ELSE END_CASE |
IEC 61131-3 Automation platform > Programming - Reference guide > Basic Operations > CASE OF ELSE END_CASE |
Created with the Personal Edition of HelpNDoc: Leave the tedious WinHelp HLP to CHM conversion process behind with HelpNDoc