Deletes all arrays listed after it.
Erase x1() [,x2(),...]
x1(),x2(),...:arrays of any type
The arrays in the list after Erase must be separated by commas.
OpenW # 1
Dim a#(5), b%(3), i%
ArrayFill a(), PI
ArrayFill b%(), 42
Mat Print a()
For i% = 1 To 3
Print b%(i%)
Next i%
Erase a(), b%()
Try
Print b%(2) // Array bounds exceed error
Catch
Print "Array Bounds Error - b%(2) no longer exists"
EndCatch
Erase clears all elements of the array from memory but does not delete the array reference; this is cleared for local variables when the procedure is exited, and for global variables when the program ends. For this reason, Erase can be used to clear all values from an array before ReDim-ing it.
{Created by Sjouke Hamstra; Last updated: 04/10/2014 by James Gaite}