[ Non-logical Variables, Arrays, Bags, Shelves and Stores | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
erase_array(+ArraySpec)
Erases existing visible array, non-logical variable or reference.
- +ArraySpec
- Of the form Atom/Integer or just atom.
Description
Used to erase the visible array uniquely specified by ArraySpec.
Also used to erase the existing non-logical variable or reference ArraySpec.
ArraySpec is of the form Atom/0, or just Atom.
Erasing reclaims the memory occupied by the array or variable.
Fail Conditions
None.
Resatisfiable
No.
Exceptions
- (4) instantiation fault
- ArraySpec is not instantiated.
- (5) type error
- ArraySpec is not an atom or of the form Atom/Integer.
- (41) array or global variable does not exist
- ArraySpec specifies an array, variable or reference which does not exist.
Examples
Success:
local(array(a(4,3))), erase_array(a/2).
setval(i,1), erase_array(i).
setval(i,1), erase_array(i/0).
Error:
erase_array(X). (Error 4).
local(array(a(4,2))),
erase_array(a(4,2)). (Error 5).
erase_array(no_array/1). (Error 41).
erase_array(no_array). (Error 41).
See Also
current_array / 2, array / 1, array / 2, variable / 1, setval / 2