Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

EraseArray

Removes the array elements of a variable and deallocates dynamic-array storage space.

Synopsis

EraseArray varname

Arguments

The EraseArray statement has the following argument:

varname The name of the variable for which the array elements should be erased.

Description

The EraseArray statement removes array elements of the variable, but not the root node.

Examples

The following example demonstrates the use of the EraseArray statement:

array = "root node"
array("subnode") = "subnode"
array("subnode", "subnode") = "subnode, subnode"
Println Exists(array) 'returns 3; variable defined and has array elements
EraseArray array
Println Exists(array) 'returns 1

See Also

Feedback