Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Crestron SIMPL+
®
Software 
Language Reference Guide - DOC. 5797G
 SIMPL+
®
 
z 85
WHILE
Name:
WHILE
Syntax:
WHILE(<expression>) 
[{]
<statements>
[}] 
Description:
This loop performs a set of <statements> as long as <expression> does not evaluate 
to zero. 
If only one statement is present in the body of the loop, then the { and } characters 
are not required, but may be used. If more than one statement is present in the loop 
body, then the { and } characters are mandatory. Note that depending on 
<expression>, the body of the loop may never be executed. Note that <expression> 
is evaluated at the beginning of each time through the loop.
Example:
INTEGER X;
X=0;
WHILE(X < 25)
{
X = X + 1;
PRINT(“X = %d\n”, X);
In this example, the loop will execute 25 times. The PRINT function will show the 
value of X after it is incremented to the computer port of the control system.
Version:
SIMPL+ Version 1.00