EasyManua.ls Logo

Crestron SIMPL+ - SIMPL+ Looping Constructs; Looping Constructs Overview; DO - UNTIL Loop

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...
Software Crestron SIMPL+
®
82 z SIMPL+
®
Language Reference Guide - DOC. 5797G
Looping Constructs
Looping Constructs Overview
Loops are used to perform a section of code zero or more times in a row in a given
SIMPL+ program. The body of the loop can consist of statements, expressions,
function calls, or other loops.
DO - UNTIL
Name:
DO - UNTIL
Syntax:
DO
[{]
<statements>
[}] UNTIL (<expression>);
Description:
This loop performs a set of <statements> at least one time and will terminate when
<expression> evaluates to true. 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 <expression> is evaluated each time through the loop.
Example:
INTEGER X;
X=0;
DO
{
X = X + 1;
PRINT(“X = %d\n”, X);
}
UNTIL (X = 25);
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

Table of Contents

Other manuals for Crestron SIMPL+

Related product manuals