Erase
Statement to erase arrays
Erase( array0 [, array1 ... arrayN ] )
array
Using Erase on a fixed-length array clears (re-initializes) all elements.
Using Erase on a variable-length array (array already sized) frees the memory used by the element data (does not allow to after resize it with a different number of dimensions).
Syntax
Usage
Erase( array0 [, array1 ... arrayN ] )
Parameters
array
An array to be erased.
Description
Using Erase on a fixed-length array clears (re-initializes) all elements.
Using Erase on a variable-length array (array already sized) frees the memory used by the element data (does not allow to after resize it with a different number of dimensions).
Example
Dim MyArray1(1 To 10) As Integer
ReDim MyArray2(1 To 10) As Integer
Erase MyArray1, MyArray2
ReDim MyArray2(1 To 10) As Integer
Erase MyArray1, MyArray2
Differences from QB
- None
See also