DIM

Format

DIM variable(integer1)

Description

This statement will create one dimensional arrays. An integer, decimal or string variable name must be specified in variable. Integer1 contains the number of elements in the array.

Example

DIM A(10)
DIM A&(20)
DIM A$(5)
DIM A@(3)
In this example an array of 10 normal integer variables is defined, an array of 20 long integer variables is defined, an array of 5 string variables is defined and an array of 3 decimal variables is defined.

Comments

On the DIM statement, number1 may only be a constant. Also, DIM statements must appear before all other statement types in the program except REM statements (or blank lines).