asserta
BAP Online Manuals : Library
Reference : Library by Name
: asserta
Previous: append
Next: assertz
BAP Online Manuals : Library Reference : Library by Name : asserta
Previous: append
Next: assertz
Previous: append
Next: assertz
6.2.9. asserta
adds a term to the front of the database
SYNOPSIS
asserta(Term)
SYNTAX
asserta(Term) (i)
ARGUMENTS
void(Term) (i) Term to be added to the database.
DESCRIPTION
This is a standard prolog built-in. Asserta() adds Term to the beginning of the database. Term must should bound to an atom or a struct, but may contain free variables. The database entry is not removed upon backtracking. Database entries can only be removed by the use of the
retract () predicate.
EXAMPLE
asserta(hello), asserta(world), retract(X), write(X),nl, fail.
ERRORS
always succeeds. No runtime errors.
LAYERS
prolog-process, client-server, object
RELATED PREDICATES
retractall , database , clause , listing
BAP Online Manuals : Library Reference : Library by Name : asserta
Previous: append
Next: assertz