EasyManua.ls Logo

Crestron SIMPL+ - CSWITCH Construct

Crestron SIMPL+
374 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.

Table of Contents

Other manuals for Crestron SIMPL+

Related product manuals