Crestron simpl plus language ref 사용자 설명서

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