Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
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