Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Software Crestron 
SIMPL+
®
318 
z SIMPL+
®
Language Reference Guide - DOC. 5797G
Compiler Error 1401
assignment error:  Variable cannot be used for assignment:  
'<identifier>'
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: 
'<identifier>' 
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”;                // ok
   sOut = str;                 // ok – sOut can be assigned a value
   sOut = “abc”;               // ok – sOut can be assigned a value
   str = sOut;                 // error – the value of sOut is lost
   Print( “str = %s”, str );   // ok – STRINGs can be read and 
written
   Print( “sOut = %s”, sOut ); // error – the value of sOut is 
unknown
}