Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Software Crestron 
SIMPL+
®
324 
z SIMPL+
®
Language Reference Guide - DOC. 5797G
Compiler Error 1506
function argument error:  0, 1 or 2 constant expected for 
argument 1
The function, MakeString, can contain a 0, 1, 2 as the first argument.  This tells the 
control system to output the resulting string to a specific destination.  An integer 
value other than 0, 1 or 2 was encountered as the first argument of MakeString().
The different destinations are as follows:
   0:  Computer Port, same as PRINT.
   1:  CPU (same functionality as the SendPacketToCPU function)
   2:  Cresnet Network (same functionality as the SendCresnetPacket function).
The following are examples of this error:
FUNCTION MyFunc( INTEGER x, STRING str ) 
{
   Call MyFunc( 1, “abc” ); // ok
   Call MyFunc();           // error – 2 arguments are expected
   Call MyFunc( 1 );        // error – argument 2 is missing
}
Compiler Error 1507
function argument error:  Argument <arg_num>:  Missing or 
invalid array 
An integer or string variable array was expected and was not encountered.
The following are examples of this error:
FUNCTION MyFunc( INTEGER x[], STRING str[] ) 
{
   INTEGER i;
   STRING strArr[100][100];
   SetArray( x, 1 );         // ok
   Call MyFunc( x, StrArr ); // ok
   SetArray( i, 1 );         // error – i is not an array
   Call MyFunc( 1, “abc” );  // error – 1 is not an array
}