Redim
Redim (Statement)
Format
redim array_variable ( integer )
redim array_variable ( integer ) fill expression
redim array_variable [ integer ]
redim array_variable [ integer ] fill expression
redim array_variable ( array_size_rows , array_size_columns)
redim array_variable ( array_size_rows , array_size_columns) fill expression
redim array_variable [ array_size_rows , array_size_columns]
redim array_variable [ array_size_rows , array_size_columns] fill expression\
Description
Re-sizes a previously created array, preserving data. If an array is enlarged the new elements are given a starting value, so that they may be read straight away: the empty string for a variable whose name ends in $, and the whole number 0 for any other variable. Add the fill clause to give them a starting value of your own instead. Either way the fill reaches only the new elements, so the values already in the array always survive. If an array is reduced in size the elements trimmed from the end are lost.
See Also
ArrayBase, ArrayLength, Assigned, Dim, Fill, Map, Mat, Redim, TypeOf, Unassign, VariableWatch
History
| 0.9.5t | New To Version |
| 1.99.99.57 | Added fill for unassigned elements |
| 2.1 | new elements are filled with 0 (or "" for a $ name) instead of being left unassigned |