Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Crestron SIMPL+
®
Software 
Language Reference Guide - DOC. 5797G
 SIMPL+
®
 
z 295
Compiler Error 1007
syntax error:  Missing array index: '<identifier>'
A variable declared as an array is being used within an expression without the array 
index being specified.  For two-dimensional arrays, both indices must be specified.  
When passing entire arrays as function arguments, no index is needed.
The following are examples of this error:
FUNCTION MyFunc()
{   
   INTEGER i, arr[10], arr2[10][20];
   STRING str[100], str2[100][50];
   i = arr[5];                       // ok
   i = arr2[5][10];                  // ok
   arr[5] = arr2[5][10];             // ok
   arr2[5][10] = 5;                  // ok
   i = arr;                          // error – no index specified
   arr = 5;                          // error – no index specified
   i = arr2[5];                      // error – 2nd index not 
specified
   str2[5] = “a”;                    // ok 
   str[5] = “a”;                     // error – ‘str’ is not an array
}