| Directives |
|
| Format | REDIM array_name[$](subscript_1[,subscript_2[,subscript_3]]) Where: |
|
| array_name[$] | Numeric or string variable to be dimensioned as an array. | |
| subscript_1 | 1st dimensions (minimum:maximum) of array. Numeric expression, integers. | |
| subscript_2 | 2nd dimensions (minimum:maximum) of array. Numeric expression, integers. | |
| subscript_3 | 3rd dimensions (minimum:maximum) of array. Numeric expression, integers. | |
| Description | The REDIM directive is used to re-dimension an array without destroying data already contained within the array. All existing data is preserved in the exact same location within the re-dimensioned array. This directive will work on string or numeric arrays. | |
| *Note* | Data in array elements that do not exist in the re-dimensioned array are discarded. | |
| Example | DIM X[1:10] X[5] = 5, X[6] = 6 REDIM X[-5:20,4 ] X[5,0] has 5 and X[6,0] has 6 because the default second index is 0; i.e., the original dimension was effectively the same as X[1:10,0:0,0:0]. |
|
| See Also | DIM Define Arrays and Strings, DIM( ) Function | |