EasyManua.ls Logo

Crestron SIMPL+ - TerminateEvent Statement

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 237
TerminateEvent
Name:
TerminateEvent
Syntax:
TerminateEvent;
Description:
Exits a CHANGE, PUSH, or RELEASE event. It may also be used to exit a loop in
the main() function if desired. TERMINATEEVENT cannot be used inside of a
function.
Example:
INTEGER X;
ANALOG_INPUT Y;
CHANGE Y
{
X=0;
WHILE(X<25)
{
IF(Y = 69)
TerminateEvent;
X = X + 1;
PRINT(“X=%d\n”, X);
}
}
In this example, the CHANGE event will terminate if the ANALOG_INPUT Y
equals the value of 69. Otherwise, the CHANGE will exit after the WHILE loop
finishes.
Version:
SIMPL+ Version 2.00 - No longer allowed inside functions, RETURN should
be used. Existing code that relies on the event terminating should be
revised.
SIMPL+ Version 1.00

Table of Contents