EasyManua.ls Logo

Crestron SIMPL+ - SIMPL+ Construct Errors; Compiler Error 1600: Function Main Limitations; Compiler Error 1601: Duplicate CASE Statement; SIMPL+ Revisions

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+
®
326 z SIMPL+
®
Language Reference Guide - DOC. 5797G
Construct Errors (Compiler Errors 1600 to 1608)
Compiler Error 1600
construct error: 'Function Main' cannot contain function
parameters
'Function Main' cannot return a value
Function Main is the starting point of a SIMPL+ program. It is automatically called
once when the system startup or is reset. Since this function is invoked by a method
outside of the SIMPL+ module, no arguments can be included in it’s argument list
and no value can be returned from it.
The following are examples of this error:
Function Main() // ok
{
}
INTEGER_FUNCTION Main() // error – Main() cannot
return
// a value
{
}
Function Main( INTEGER cmdLineArg ) // error – Main() cannot
contain
// a parameter list
{
}
Compiler Error 1601
construct error: DuplicateCASE Statement
Constant expected: '<identifier>'
Unlike the Switch Statement the CSwitch statement’s case statements must consist of
unique values. Expressions are not permitted within the case statements. Instead,
each case statement must contain a unique integer value for the CSwitch’s
comparison.
The following are examples of this error:
FUNCTION MyFunc( INTEGER x )
{
STRING str[100];
CSwitch( x )
{
case (1): // ok – 1 has not been used yet
{
}
case (2): // ok – 2 has not been used yet

Table of Contents