Portraying a Clause

If you want to print a clause, portray_clause/1 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, 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 and listing/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.