Internal Database

KEY This section describes predicates for manipulating an internal indexed database that is kept separate from the normal program database. They are intended for more sophisticated database applications and are not really necessary for novice users. For normal tasks you should be able to program quite satisfactorily just using assert and retract. recorded(Key,Term,Ref) The internal database is searched for terms recorded under the key Key. These terms are successively unified with Term in the order they occur in the database. At the same time, Ref is unified with an implementation-defined identifier uniquely identifying the recorded item. The key must be given, and may be an atom, integer or complex term. If it is a complex term, only the principal functor is significant. recorda(Key,Term,Ref) The term Term is recorded in the internal database as the first item for the key Key, where Ref is its implementation-defined identifier. The key must be given, and only its principal functor is significant. recordz(Key,Term,Ref) The term Term is recorded in the internal database as the last item for the key Key, where Ref is its implementation-defined identifier. The key must be given, and only its principal functor is significant. erase(Ref) The recorded item or interpreted clause whose implementation-defined identifier is Ref is effectively erased from the internal database or interpreted program. instance(Ref,Term) A (most general) instance of the recorded term whose implementation-defined identifier is Ref is unified with Term. Ref must be instantiated to a legal identifier.