Software
®
292
SIMPL+
Compiler Error 1002
syntax error: Missing '<token>'
A language element was expected and not found. The compiler expects certain
language elements to appear before or after other elements. If any other language
element is used, the compiler cannot understand the statement. Examples are missing
parenthesis after a function call, missing semicolons after a statement and missing
braces when defining functions.
A token is a language element such as a keyword or operator. Anything that is not
whitespace (i.e.: spaces, tabs, line feeds and comments) is a token.
Examine the last uncommented non-blank line or statement within the program. If a
token was required in a previous statement and was not encountered, the compiler
will continue onto the next line and mark the first token of the new statement as the
error.
The following are examples of this error:
STRUCTURE MyStruct
{
INTEGER x;
STRING s[100];
}
MyStruct struct;
INTEGER_FUNCTION MyFunc( INTEGER ) // error – argument
variable
INTEGER x;
Print "abc";
// printing...
Print "def"
// more printing...
Print "ghi";
Print
x = ((1+2) + 3;
x = atoi( "abc", 1 ); // error – atoi() does not take 2
arguments
if ( x = 4 )
return 5;
return (6);
}
Crestron SIMPL+
// error – missing ';' from preceding
//
structure definition
//
// error – '{' missing before INTEGER
// error – missing parenthesis
//
should be Print ("abc" );
// error – error message will occur on
//
next statement
// error – missing ';'from preceding
//
statement
// error – unmatched set of parentheses
// error – should be return (5);
// ok
Language Reference Guide - DOC. 5797G
®
not specified
Need help?
Do you have a question about the SIMPL+ and is the answer not in the manual?
Questions and answers