assertz

BAP Online Manuals : Library Reference : Library by Name : assertz
Previous: asserta
Next: atom

6.2.10. assertz

adds a term to the end of the database

SYNOPSIS

assertz(Term)

SYNTAX

 assertz(Term) (i)

ARGUMENTS

void(Term) (i) Term to be added to the database.

DESCRIPTION

This is a standard prolog built-in. Assertz() adds Term to the end 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

assertz(world),
assertz(hello),
retract(X),
	write(X),nl,
	fail.

ERRORS

always succeeds. No runtime errors.

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

asserta , retract , retractall , database , clause , listing


BAP Online Manuals : Library Reference : Library by Name : assertz
Previous: asserta
Next: atom