EasyManua.ls Logo

Crestron SIMPL+ - Compiler Error 1309: Compiler Directive Placement

Crestron SIMPL+
374 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Software Crestron SIMPL+
®
312 z SIMPL+
®
Language Reference Guide - DOC. 5797G
Compiler Error 1309
declaration error: Compiler Directive must be set before all
global variable declarations
#DEFAULT_NONVOLATILE Compiler
Directive already set
#DEFAULT_VOLATILE Compiler
Directive already set
The compiler directives, #DEFAULT_VOLATILE and
#DEFAULT_NONVOLATILE, must be used before any global variables are
encountered within the SIMPL+ module. A module cannot contain more than one of
these directives.
The following are examples of this error:
////////////////////////////////////////////////////////////
//////
// Example 1
#DEFAULT_VOLATILE // ok – compiler directive exists before
// all global variables
INTEGER x;
STRING str[100];
DIGITAL_INPUT di;
FUNCTION MyFunc()
{
}
////////////////////////////////////////////////////////////
//////
// Example 2
INTEGER x;
STRING str[100];
DIGITAL_INPUT di;
#DEFAULT_VOLATILE // error – global variables have already
been
// declared within this module
FUNCTION MyFunc()
{
}
////////////////////////////////////////////////////////////
//////
// Example 3
#DEFAULT_VOLATILE // ok – compiler directive exists before

Table of Contents