Did you know ... Search Documentation:
Pack prolog_library_collection -- prolog/print_ext.pl
PublicShow source
 ansi_format(+Attributes:list(compound), +String:string) is det
 call_print(:Goal_1) is det
 call_print_boolean(:Goal_0) is det
 dcg_ansi_format(+Attributes:list(compound), :Dcg_0) is det
 print_boolean(+Boolean:boolean) is det
 print_json(+Dict:dict) is det
 print_json(+Indent:nonneg, +Dict:dict) is det
 print_file_peek(+File:atom, +Length:nonneg) is det
 print_file_peek(+File:atom, +Length:nonneg, +Attributes:list(compound)) is det
 print_stream_peek(+In:istream, Length:nonneg) is det
 print_stream_peek(+In:istream, Length:nonneg, +Attributes:list(compound)) is det
 print_term(+Term:term) is det
 print_term_nl(+Term:term) is det
 print_term_nl(+Term:term, +Options:options) is det
 print_term_nl(+Out:blob, +Term:term, +Options:options) is det

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

 print_term(+Term, +Options) is det
Pretty print a Prolog term. The following options are processed:
output(+Stream)
Define the output stream. Default is user_output
right_margin(?Column)
Width of a line. If the output is a tty and tty_size/2 can produce a size the default is the number of columns minus 8. Otherwise the default is 72 characters. If the Column is unbound it is unified with the computed value.
left_margin(+Integer)
Left margin for continuation lines. Default is the current line position or 0 if that is not available.
tab_width(+Integer)
Distance between tab-stops. Default is 8 characters.
indent_arguments(+Spec)
Defines how arguments of compound terms are placed. Defined values are:
  • false
    Simply place them left to right (no line-breaks)
  • true
    Place them vertically, aligned with the open bracket (not implemented)
  • auto (default)
    As horizontal if line-width is not exceeded, vertical otherwise. See also auto_indent_arguments(Int)
  • An integer
    Place them vertically aligned, <N> spaces to the right of the beginning of the head.
auto_indent_arguments(+Integer)
Used by indent_arguments(auto) to decide whether to introduce a newline after the `(` or not. If specified and > 0, this provides the default integer for indent_arguments(Int). The "hanging" mode is used if otherwise the indentation increment is twice this value.
operators(+Boolean)
Deprecated. This is the inverse of the write_term/3 option ignore_ops. Default is to respect them. If either operators or the ignore_ops in write_options is specified, both are consistently set. If both are specified, the ignore_ops options in the write_options is respected.
write_options(+List)
List of options passed to write_term/3 for terms that are not further processed. Default:
    [ numbervars(true),
      quoted(true),
      portray(true)
    ]
fullstop(Boolean)
If true (default false), add a full stop (.) to the output.
nl(Boolean)
If true (default false), add a newline to the output.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 print_json(Arg1, Arg2)
 print_file_peek(Arg1, Arg2, Arg3)
 print_stream_peek(Arg1, Arg2, Arg3)
 print_term_nl(Arg1, Arg2)
 print_term_nl(Arg1, Arg2, Arg3)
 ansi_format(Arg1, Arg2, Arg3)
 ansi_get_color(Arg1, Arg2)
 ansi_hyperlink(Arg1, Arg2)
 ansi_hyperlink(Arg1, Arg2, Arg3)