Compiler Error 1003; Compiler Error 1004 - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

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 );
x = MyFunc( 1 ); // error – x cannot accept the resulting
string
}

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
else
{
x = 0;
}
}
// error – y is not of type STRING
//
returned from MyFunc()
//
'while' construct
// error – no preceding 'if' statement
Software
®
SIMPL+
293

Advertisement

Table of Contents
loading

Table of Contents