While - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

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
Software
®
SIMPL+
85

Advertisement

Table of Contents
loading

Table of Contents