Dimensions arrays so they can be used in a DataBasic program.
DIM{ENSION} array-name(dimensions){,array-name(dimensions)...}
array-name is the name of the array to be dimensioned.
dimensions is the size of the array.
An array can be one-dimensional, (vector) or two-dimensional (matrix). See Dimensioned Arrays for more details and the limits on the number of elements.
The maximum dimensions of an array must be specified with a DIMENSION or COMMON statement. The dimensions are declared with literal whole numbers greater than or equal to one, separated by commas. A DIMENSION (or COMMON) statement must precede any reference to the array it dimensions and is usually placed at the beginning of the program.
An array that is specified in a COMMON statement must not be specified in a DIMENSION statement.
You can dimension several arrays with a single DIMENSION statement. For example:
DIMENSION A1(10,5), X(50)
This example declares Array A1 as a 10 by 5 matrix and declares Array X as a 50-element vector.
Notes:
DIMENSION MATRIX(10,12)
Specifies a 10 by 12 matrix called MATRIX.
DIM Q(10), R(10), S(10)
Specifies 3 vectors named Q, R and S, each of which contains 10 elements.