Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®
Compiler Error 1308
declaration error: Global variable declaration cannot be
I/O declarations and global variables can only be defined in a SIMPL+ module (.usp
file). Libraries files (.usl files) are files that only contain functions. Local functions
variables, function arguments and function that return values are permitted within
library files.
The following are examples of this error:
////////////////////////////////////////////////////////////
//////
//
MyLib.usl
INTEGER x;
STRING str[100];
DIGITAL_INPUT di;
FUNCTION MyFunc()
{
INTEGER i, j;
STRING str[100];
}
INTEGER_FUNCTION MyIntFunc( INTEGER x ) // ok – x is local
{
INTEGER i, j;
STRING str[100];
return (x);
}
STRING_FUNCTION MyStFunc( STRING s )
{
INTEGER i, j;
STRING str[100];
return (str);
}
declared in library file: '<identifier>'
I/O Declaration cannot be declared in library
file: '<identifier>'
Software
// error – x is global
// error – str is global
// error – di is global
// ok – i and j are local
// ok – str is local
// ok – i and j are local
// ok – str is local
// ok – s is local
// ok – i and j are local
// ok – str is local
®
SIMPL+
311
Need help?
Do you have a question about the SIMPL+ and is the answer not in the manual?
Questions and answers