Static / Fixed Arrays
These are manually dimensionalized. Dimensions and number of elements are defined manually when arrays are declared. For example:
These have to be populated from their declaration specs. For example:
Dynamic Arrays
These are unspecified in terms of dimensions and number of elements. Example:
These have to be redimensionalized every time an element or a dimension is added. The ReDim statement is used for this. Using ReDim alone will empty the area every time it is redimensionalized so you have to populate it afterwards. Use this on arrays with more than one dimension. For example:
Using ReDim Preserve saves the values that are already in the array and also redimensionalizes it. It saves time for one-dimensionals, like:
More than one dimension usually does not work with Preserve because the last dimension must not be manipulated when using the key word.
Bookmarks