Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Software Crestron 
SIMPL+
®
54 
z SIMPL+
®
Language Reference Guide - DOC. 5797G
INTEGER
Name:
INTEGER
Syntax:
INTEGER <var1>[,<var2>...];
INTEGER <var1>[size] [,<var2>[size]…];
INTEGER <var1>[rows1][columns1] [,<var2>[rows2][columns2]…]; 
Description:
The first form declares an integer value that is local to this SIMPL+ program. 
INTEGER values are 16-bit quantities and are treated the same as ANALOG_INPUT 
values and range from 0-65535.
The second form declares a one-dimensional array of INTEGER values.
The third form declares a two-dimensional array of INTEGER values. A two-
dimensional array can be thought of as a table or matrix. 
The values for SIZE, ROWS, and COLUMNS may be up to 65535. 
An INTEGER array element may be used anywhere an INTEGER is legal. Array 
elements are referenced by using the name followed by [element] for one-
dimensional arrays or [element1][element2] for two-dimensional arrays. The element 
number may range from 0 to the element size. For example, if an array is declared as 
NUM[2], then legal elements are NUM[0], NUM[1], and NUM[2]. The bracket 
notation is often called an array subscript.
NOTE: (X-Gen) The values of INTEGERs declared outside of functions are non-
volatile. If the system is powered down and up, the variables will take the previous 
values. If programs are changed and uploaded, the values are not preserved.
NOTE:  (2-Series) INTEGERs can be volatile or non-volatile. The default is defined 
using the compiler directives #DEFAULT_NONVOLATILE or 
#DEFAULT_VOLATILE or overridden using the nonvolatile or volatile keywords.
NOTE: If no RETURN statement is encountered, the function automatically returns 
a 0.