Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Crestron SIMPL+
®
Software 
Language Reference Guide - DOC. 5797G
 SIMPL+
®
 
z 293
Compiler Error 1003
syntax error:  Incorrect type '<decl_type>', expected type(s): 
'<decl_type1[,decl_type2] [,decl_typen]>' Incorrect type, 
expected type(s): '<decl_type1[,decl_type2][,decl_typen]>'
A specific variable or type was expected and not found.  Examples are variables of 
one type being used in place of another, and incorrect variable types within function 
arguments.
The following are examples of this error:
STRING_FUNCTION MyFunc( INTEGER x )
{   
   INTEGER y;
   x = getc( y );   // error – y is not of type STRING
   x = MyFunc( 1 ); // error – x cannot accept the resulting 
string
                    //         returned from MyFunc() 
}
Compiler Error 1004
syntax error:  Unmatched symbol: '<identifier>'
Some language constructs are composed of more than one keyword.  In these cases, 
each keyword may require statements before and after it is used.
For example, the Switch statement uses the following keywords, Switch, Case, and 
Default.  If the keyword, Case, is encountered before or outside of switch statement, 
this error will result.
The following are examples of this error:
FUNCTION MyFunc( INTEGER x )
{   
   x = 1;
   while ( 1 )
   {
      x = x + 1;
   } until ( x > 5 ); // error – ‘until’ is not part of the
                      //         ‘while’ construct
   else               // error – no preceding ‘if’ statement
   {
      x = 0;
   }
}