Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).

Erase, EraseValue, and EraseArray Commands

generated description: treedone.gif

The Erase, EraseValue, and EraseArray commands erase parts or sections of arrays. Erase a node: erases the node and its children. In particular, Erase A erases the entire structure. EraseValue a node: erases the value of a node only. EraseArray a node: erases the children only.

A = 4 : A(3) = 4 : A(3,3) = 4
print "A(3) before erasevalue: ", exists(A(3))
erasevalue A(3) : println " after: ", exists(A(3))
print "A(3) before erasearray: ", exists(A(3))
erasearray A(3) : println " after: ", exists(A(3))
print "A before erase: ", exists(A)
erase A : println " after: ", exists(A)
Copy code to clipboard
FeedbackOpens in a new window