Definition: Reinitializes the elements of fixed-size arrays and deallocatesdynamic-array storage space.
The Erase statement is similar to a check for a million dollars: although we have no doubt that these items exist, the Scripting Guys have little experience with either one. Suppose you have an array with 9 items. When you run the Erase statement against that array you’ll still have an array with 9 items; however, none of those items will have a value (string values will now be empty, while numeric values will be set to 0).
Got that? Like we said, we run across the Erase statement about as often as we run across a million dollars. However, if you need to set all the values in an array to 0, well, here’s a command that can do that for you:
Let’s assume that $a started off life as an array with the following values: