Writes Clause to the current output stream. Used by
stream_object, must be ground
A valid open Prolog stream, defaults to the current output stream.
The operation used by
listing/[0,1]. Clause is written
to Stream, in exactly the format in which
would have written it, including a terminating full-stop.
If you want to print a clause, this is almost certainly the
command you want. By design, none of the other term output
commands puts a full-stop after the written term.
If you are writing a file of facts to be loaded by
the Load Predicates, use
portray_clause/[1,2], which attempts
to ensure that the clauses it writes out can be read in again as clauses.
The output format used by
been carefully designed to be clear. We recommend that you use a
similar style. In particular, never put a semicolon
(disjunction symbol) at the end of a line in Prolog.
Stream errors (see ref-iou-sfh-est).
| ?- portray_clause((X:- a -> b ; c)). _ :- ( a -> b ; c ).
| ?- portray_clause((X:- a -> (b -> c ; d ; e); f)). _ :- ( a -> ( b -> c ; d ; e ) ; f ).
| ?- portray_clause((a:-b)). a :- b.
| ?- portray_clause((a:-b,c)). a :- b, c.
| ?- portray_clause((a:-(b,!,c))). a :- b, !, c.