Portraying a Clause

If you want to print a clause, portray_clause/[1,2] is almost certainly the command you want. 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 compile/1, 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 portray_clause/[1,2] and listing/[0,1] has 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. See mpg-ref-portray_clause.

Send feedback on this subject.