Compiler Error 1002 - Crestron SIMPL+ Reference Manual

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

Advertisement

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

Advertisement

Table of Contents
loading

Table of Contents