The assertion predicates are used to add clauses to the database in various
ways. The relative position of the asserted clause with respect to
other clauses for the same predicate is determined by the choice among
assert/1
, asserta/1
, and assertz/1
. A database reference
that uniquely identify the clause being asserted is established by
providing an optional second argument to any of the assertion
predicates.
assert(
C)
assert(
C,
R)
assert/1
; reference R is returned
asserta(
C)
asserta(
C,
R)
asserta/1
; reference R is returned
assertz(
C)
assertz(
C,
R)
assertz/1
; reference R is returned
multifile_assertz(
C)