Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Crestron SIMPL+
®
Software 
Language Reference Guide - DOC. 5797G
 SIMPL+
®
 
z 87
CSWITCH
Name:
CSWITCH
Syntax:
CSWITCH (<expression>)
{
CASE (<unique integer constant>):
[{]
<statements1>
[break;]
[}]
 
CASE (<unique integer constant >):
[{]
<statements2>
[break;]
[}]
 
[DEFAULT:
[{]
<statements>
[break;]
[}]
}
Description:
CSWITCH is a more direct method of writing a complex IF-ELSE-IF statement. In 
the CSWITCH, if <expression> is equal to a CASE’s constant, then the statement 
block for that CASE value is executed. This same method would apply to as many 
CASE statements as are listed in the body of the CSWITCH. Note that if any of the 
NOTE: In SIMPL+ v3.01.00 and later, the 'break' statement is required to terminate 
the case statement block that it resides within. If no 'break' statement exists, the 
program will continuing executing to the next case statement block or default 
statement block. 
NOTE: Many CASE statements may be used in the body of the CSWITCH.