mk90.basic.statements
Statement DIM
Allocate a zero-based integer array.
Syntax
DIM array(upper-bound)Parameters
| Parameter | Meaning |
|---|---|
array | One letter A–Z; independent from its scalar. |
upper-bound | Runtime integer 0–75, subject to remaining total capacity. |
Behavior
DIM A(9) allocates ten zeroed words, indexed 0 through 9. All arrays share 76 elements. An array may be dimensioned once per execution. Out-of-range access, missing DIM, repeated DIM or insufficient capacity returns status 39.
Example
DIM A(3)
FOR I=0 TO 3
A(I)=I*I
NEXT I
PRINT A(3)Limits and diagnostics
One dimension and one declaration per statement. No REDIM, arrays of strings or implicit allocation.
See also
LET · READ · Language syntax