20
CipherLab BASIC Programming Part I
An array is a group or table of values referenced by the same variable name. Each
element in an array is referenced by an array variable that is subscripted with an integer
or an integer expression.
An array variable name has as many dimensions as there are subscripts in the array.
For example,
A(12) : would reference a value in a one-dimension array.
T(2, 5) : would reference a value in a two-dimension array.
… and so on.
Each element in an array is referenced by an array variable that is subscripted with
an integer or an integer expression. For example,
DIM IntegerA%(20) : declares an integer array with 20 elements.
DIM StringB$(100) : declares a string array with 100 elements.
DIM RealC!(10) : declares an integer array with 10 elements.
DIM Tb(5, 5) : declares a two-dimension integer array with 5x5 elements.
ArrayD(i+1, j) : The elements of an array are subscripted with an integer
expression.
The first element of an array is subscripted with 1.
In the CipherLab BASIC language, the maximum number of dimensions for an array
is 2, and, up to 32,767 elements per dimension is allowed while compiling.