Description:
This redimensions an already dimensioned array and clears all elements to zero (or to an empty string in the case of string arrays). This can be very useful for writing applications that have data sets of unknown size. If you dimension arrays that are extra large to make sure you can hold data, but only have a small set of data, then all the space you reserved is wasted. This hurts performance, because memory is set aside for the number of elements in the DIM statement.
Usage:
dim cust$(10) 'dimension the array
.
.
.
'We have determined that there are 510 customers on file, so...
redim cust$(510)
'now read in the customer records