Erase statement (LotusScript® Language)

Deletes an array, list, or list element.

Syntax

Erase { arrayName | listName | listName ( tag ) } [, { arrayName | listName | listName ( tag ) } ]...

Elements

arrayName

An array or a Variant variable containing an array. arrayName can end with empty parentheses.

listName

A list or a Variant variable containing a list. listName can end with empty parentheses.

tag

The list tag of a list element to be erased from the specified list.

Usage

The following table shows how the Erase statement affects arrays and lists.

Item

Effect of Erase statement

Fixed array

Its elements are reinitialized.

Dynamic array

LotusScript® removes all elements from storage and recovers the storage. The array retains its type, but has no elements.

You must use ReDim to redeclare the array before referring to its elements again. If you used ReDim before it was erased, the array maintains the same number of dimensions.

List

LotusScript® removes all elements from storage and recovers the storage. The list retains its type, but has no elements.

List element

The element no longer exists in the list.

Example