Fatal Errors (Compiler Errors 1100 To 1101); Compiler Error 1100 - Crestron SIMPL+ Reference Manual

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

Advertisement

Software

Fatal Errors (Compiler Errors 1100 to 1101)

®
300
SIMPL+

Compiler Error 1100

fatal error: Statement outside of function scope
User-defined functions, Events, and compiler directives can only be defined at a
global level.
Scope refers to the level at which an Event, user-defined function or statement
resides. Having a global scope means that the function or variable can be called or
accessed from anywhere within the program. A local scope means that the variable
can only be accessed from within the event or function that it resides in.
Variables can have either a global or local scope.
The following are examples of this error:
INTEGER i;
STRING str[100];
#DEFINE_CONSTANT
#DEFINE_CONSTANT
needed
i = 5;
// error – variables can only be used within a
// function or event
Call MyFunc(); // error – functions can only be called from
//
;
// error – a semicolon is valid statement (which
//
//
{
// error – braces only signify a group of
// statements within a function or
// construct (i.e.: if-else, while, etc)
INTEGER x;
INTEGER y;
}
Print( "outside of everything" ); // error – statement is
FUNCTION MyFunc()
{
}
myConst
1
// ok
myConst
2; // error – semicolon is not
another function or event
does nothing), and is not contained
within a function or event
// not contained within
// a function or event
// ok
Language Reference Guide - DOC. 5797G
Crestron SIMPL+
®

Advertisement

Table of Contents
loading

Table of Contents