REDIM

Action

Declares dynamic-array variables, and allocates or reallocates storage space at procedure level.

 

Syntax

REDIM [PRESERVE] "variable1" [<,> [PRESERVE] "variablex"]

 

Remarks

If the Preserve keyword is specified, each dimension except for the rightmost one must be the same as those of the existing array. The values in the existing array are copied into the new array: if the new array is smaller, the existing values are discarded; if the new array is bigger, the extra elements will be empty.

 

Examples

REDIM $MyArray[20]

 

REDIM PRESERVE $Array[9]      ; Note : preserves contents of the array.

 

REDIM PRESERVE $FirstArray[9] , PRESERVE $NextArray[10]