[ Dynamic Predicates | Reference Manual | Alphabetic Index ]

listing

Outputs the definition of all dynamic predicates in the database.

Description

Outputs each of the dynamic predicates currently contained on the database. ie. all predicates created using assert/1 or asserta/1 or compiled as dynamic predicates.

The order in which the predicates are listed is undefined.

The individual clauses are output in indented format using writeclause/2.

No static predicates are output.

Modes and Determinism

Modules

This predicate is sensitive to its module context (tool predicate, see @/2).

Examples

Success:
    [eclipse]: [user].
     :- dynamic x/0, y/1.
     x :- true.
     y(X) :- write(X).
     user compiled 0 bytes in 0.07 seconds
    yes.
    [eclipse]: assert(man(adam)), assert(woman(eve)),
    > assert((likes(X,Y):-man(X),woman(Y))).
    X = _g102
    Y = _g98
    yes.
    [eclipse]: listing.
    x .
    y(_g68):-
            write(_g68) .
    likes(_g68, _g70):-
            man(_g68),
            woman(_g70) .
    woman(eve) .
    man(adam) .
    yes.



See Also

assert / 1, clause / 2, listing / 1, writeclause / 1