Compiler Error 1401; Compiler Error 1402 - Crestron SIMPL+ Reference Manual

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

Advertisement

Software
®
318
SIMPL+

Compiler Error 1401

assignment error: Variable cannot be used for assignment:
Function arguments that have been declared as ReadOnlyByRef can only have their
values read; values cannot be assigned to them.
The following are examples of this error:
FUNCTION MyFunc( INTEGER x, ReadOnlyByRef INTEGER y )
{
x = 5; // ok
x = y; // ok – the value of y can be read
y = 6; // error – y is read-only
}

Compiler Error 1402

assignment error: Variable can only be used for assignment:
STRING_OUTPUT variables can only have their values read. Once assigned a
value, that value is immediately acted upon by the control system, and the value is
assumed to be unknown thereafter.
The following are examples of this error:
STRING_OUTPUT sOut;
STRING str[100];
FUNCTION MyFunc()
{
str = "abc";
sOut = str;
sOut = "abc";
str = sOut;
Print( "str = %s", str );
written
Print( "sOut = %s", sOut ); // error – the value of sOut is
unknown
}
'<identifier>'
'<identifier>'
// ok
// ok – sOut can be assigned a value
// ok – sOut can be assigned a value
// error – the value of sOut is lost
// ok – STRINGs can be read and
Language Reference Guide - DOC. 5797G
Crestron SIMPL+
®

Advertisement

Table of Contents
loading

Table of Contents