[ Recorded Database | Reference Manual | Alphabetic Index ]
Succeeds if the term Value associated with key Key is removed as an entry
from the record database.
- Atom, compound term, or handle.
- An arbitrary term.
Finds the first term associated with Key that can be unified with Value
and removes its entry from the record database. It fails if such an
entry cannot be found. If Value is uninstantiated, the first value
under the key Key is removed. In the case of compound terms, all keys
of the same name and arity are treated as equal. Backtracking through
calls of erase/2 does not undo an erasure.
Modes and Determinism
- erase(+, +) is semidet
- erase(+, -) is semidet
This predicate is sensitive to its module context (tool predicate, see @/2).
Fails if Value does not unify with any term recorded under the key Key
- (4) instantiation fault
- Key is not instantiated.
- (5) type error
- Key is neither atom, compound term, nor record handle.
Value = jameson
L = bushmills More? (;)
L = glenfiddich More? (;)
no (more) solution.
erase(Key,anything). (Error 4)
erase("whiskey",anything). (Error 5)
erase_all / 1, record_wait_remove / 3