basic/doc/statements/dim.rs
1/*!
2# `DIM <variable name>(<dimensions>)[,...]`
3
4## Purpose
5Prepare an array by defining its dimensions and size.
6
7## Remarks
8Arrays are sparse. You can, for example, define a 32767 by 32767 array
9of 1073676300 elements. The number of values that can be stored is 64K
10for all variables combined. Index values are integers in the range of
110-32767. Accessing an array before it is dimensioned automatically defines
12it with a dimension of 10. The index is inclusive so `DIM X(10)`
13allows the use of `X(0)` to `X(10)`
14
15## Example
16```text
1710 DIM A$(100), X(10,10)
1820 A$(42)="THE ANSWER"
1930 X(4,2)=2.7182818
2040 PRINT A$(42)+"!", X(4,2)
21RUN
22THE ANSWER! 2.7182817
23```
24*/