EasyManua.ls Logo

Crestron SIMPL+ - Compiler Error 1606: Statement Must Be Within a 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+
®
330 z SIMPL+
®
Language Reference Guide - DOC. 5797G
{
TerminateEvent; // error – TerminateEvent is not within
// an event function
}
}
Compiler Error 1606
construct error: Statement must be contained within a loop
statement
The ‘break’ statement can only be used with a loop construct. Valid loop constructs
are While loops, Do-While loops and For loops. The compiler encountered this
function outside of one of these event functions.
The following are examples of this error:
FUNCTION MyFunc()
{
INTEGER I;
for ( i = 1 t 10 )
{
break; // ok
}
while (1)
{
break; // ok
}
do
{
break; // ok
} until (1);
if (1)
{
break; // error – break cannot exist within an ‘if’
statement
}
}
EVENT
{
break; // error – TerminateEvent should be used instead
}

Table of Contents