[ Dynamic Predicates | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

listing +SpecList

Outputs the definition of all dynamic predicates indicated by SpecList.
+SpecList
Sequence of expressions of the form Atom/Integer or just Atom.

Description

Outputs the definition of all dynamic predicates defined by SpecList to the standard output. An expression in SpecList may be a single predicate in the form name/arity in which case only the clauses for name/arity are printed. Alternatively the format name is accepted in which case all the predicates of any arity associated with name are output.

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

No static predicates are output.

Fail Conditions

None.

Resatisfiable

No.

Exceptions

(4) instantiation fault
An expression in SpecList is not instantiated.
(5) type error
An expression in SpecList is not of the form Atom/Integer or Atom.
(63) procedure not dynamic
An expression in SpecList is not a dynamic procedure.

Examples

Success:
    [eclipse]: [user], assert(woman(eve)).
     :- dynamic p/0.
     p.
     user compiled 0 bytes in 0.00 seconds
    yes.
    [eclipse]: listing p/0, woman/1.
    p .
    woman(eve) .
    yes.

Error:
    listing X.                  (Error 4).
    listing a/a.                (Error 5).
    listing z/3.                (Error 63).



See Also

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