HTBasic Help
×
Menu
Index

REDIM

Redimensions an array by changing the subscript ranges.
 
 REDIM array-name[$](bounds) [,array-name[$](bounds)...]
 
 
 
Usage:
REDIM Array(Lowbnd:Upbnd)
REDIM Myarray$(I,J,K,L)
Example: REDIM.BAS
Description:
An array can only be redimensioned if the number of dimensions is the same as in the original DIM statement and the total number of elements does not exceed the total in the DIM statement. Also, to redimension an array declared in a COM statement, the COM declaration must include subscript information (as opposed to a full array specifier, "(*)").
REDIM does not change the values presently stored in memory, but because the number of elements in each dimension might change, the values in each element may appear to "move" to another element.
See Also: