[ Recorded Database | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

erase_all(+Key)

All the the values associated with key Key are removed from the indexed database.
Key
An atom or compound term.

Description

Used to remove all entries from the indexed database with the associated key Key. In the case of compound terms, all keys of the same name and arity are treated as equal.

Modes and Determinism

Modules

This predicate is sensitive to its module context (tool predicate, see @/1).

Exceptions

(4) instantiation fault
Key is uninstantiated.
(5) type error
Key is neither an atom nor a compound term.

Examples

   Success:
   [eclipse]: record(whiskey,jameson),
   >        record(whiskey,bushmills),
   >        record(whiskey,glenfiddich),
   >        record(whiskey,dimple).
   yes.
   [eclipse]: erase_all(whiskey).
   yes.
   [eclipse]: recorded(whiskey,L).
   no (more) solution.
   Error:
   erase_all(Key).                  (Error 4)
   erase_all("key").                (Error 5)
   erase_all(1).                    (Error 5)



See Also

erase / 2