Erase - statement of language VBScript

Reinitializes the elements of fixed-size array and deallocates dynamic-array storage space .

Erase array
The array argument is the name of the array variable to be erased.
It is important to know whether an array is fixed-size (ordinary) or dynamic because statement behaves differently depending on the type of array. Erase recovers no memory for fixed-size arrays. Erase sets the elements of a fixed array as follows:

Type of array Effect of Erase on fixed-array elements
Fixed numeric array Sets each element to zero.
Fixed string array Sets each element to empty string ("").
objects Sets each element to the special value Nothing

Erase frees the memory used by dynamic arrays. Before your program can refer to the dynamic array again, it must redeclare the array variable's dimensions using a ReDim statement.
See also:
VBScriptSelect and copy to clipboard

Dim numArray( 9), dynArray()
ReDim dynArray(9)   ' Allocate storage space
Erase numArray   ' Each element is reinitialized
Erase dynArray   ' Free memory used by array
PROMOTIC 9.0.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice