retrieves and discards information from the database.
void(Term) (x) Term to be matched with and removed from database entries
This is a standard PROLOG built-in. It retrieves information from the database by
matching its argument with any term stored in the database. If it matches, the database
entry is removed. Upon backtracking multiple solutions may occur. You may invoke
indefinite loops by using a retract(X), ..., assertz(X),fail. construct.
Different from standard prolog you may use this with an uninstantiated variable to remove all entries.
asserta(hello), asserta(world), retract(X), write(X),nl, fail.
No runtime errors.
prolog-process, client-server, object
asserta , assertz , retractall ,
clause , database ,