database
BAP Online Manuals : Library
Reference : Library by Name
: database
Previous: cutbacktrack
Next: dcall
BAP Online Manuals : Library Reference : Library by Name : database
Previous: cutbacktrack
Next: dcall
Previous: cutbacktrack
Next: dcall
6.2.35. database
retrieves information from the database.
SYNOPSIS
database(Term)
SYNTAX
database(Term) (x)
ARGUMENTS
void(Term) (x) Term to be matched with database entries
DESCRIPTION
This predicate retrieves information from the database by matching its argument with any term stored in the database. Until the DATABASE keyword is implemented, you have to use this or clause to make a non-destructive database query. Database acts just like retract (), except that it does not remove the entries. You may invoke indefinite loops by using a database(X), ..., assertz(X),fail. construct.
EXAMPLE
asserta(hello), asserta(world), database(X), write(X),nl, fail.
ERRORS
No runtime errors.
LAYERS
prolog-process, client-server, object
RELATED PREDICATES
asserta , assertz , retract , retractall , clause , listing
BAP Online Manuals : Library Reference : Library by Name : database
Previous: cutbacktrack
Next: dcall