dim directive
Syntax
dim-directive: | dim [private | protected | public] <ident> [ <expr> ] |
Description
Declares and sets dimension of an array variable. All elements of an array are initialized to null (void). To assign a value to an element, use define directive specifying array index in square brackets after array idetifier. It is also possible to use array elements as the left operand of assignment operators, it is not necessary to define them first.
If the default visibility (see first syntax of define) differs from the one specified in dim directive, it must be specified in define as well, when assigning a value to an element.
Prior to using array, it must be declared with this directive. You cannot apply define directive on an element of an array that has not been defined yet.
Examples
#dim MyArray[10] ; declare an array of 10 elements