portray/1
[hook]:- multifile user:portray/1.
user:portray(
+Term)
A way for the user to over-ride the default behavior of print/1
.
If user:portray/1
is defined, then the predicates listed below
performing term output will call it on the term itself and on every
non-variable subterm T. If user:portray/1
succeeds, it
is assumed to have written T. If it fails, the calling predicate
will write the principal functor of T and treat the arguments of T
recursively.
Note that on lists ([_|_]
), user:portray/1
will be
called on the whole list to user:portray/1
and, if that call
fails, on each list element, but not on every tail of the list.
The affected predicates are:
print/[1,2]
write_term/[2,3]
portrayed(true)
debugger_print_options
Prolog flag,
whose value by default includes portrayed(true)
toplevel_print_options
Prolog flag,
whose value by default includes portrayed(true)
Exceptions are treated as failures, except an error message is printed also