Both the toplevel query/answer loop as the debugger abbreviate long
complex terms. They do this to avoid endless pages of output. In fact,
they write using write_term/3 which takes an option-list as argument.
The option list for answers printed by the Prolog toplevel is in the
toplevel_print_options and the one for the debugger is in
debugger_print_options. Initially both have the value given below:
?- current_prolog_flag(toplevel_print_options, X). X = [quoted(true), portray(true), max_depth(10), spacing(next_argument)].
max_depth(10) says anything nested more then 10 levels should
be written as
What to do?
If the system prints an answer that is abbreviated and you want to see
it all, type w and the system will use plain write/1 for printing the
answer: (the user pressed w at the place the diagram says
[write]). Note the ; true. This is used to introduce
non-determinism that makes Prolog wait after the answer. If the
answer is deterministic, Prolog prints it with the default settings
and prompts for the next command.
?- atom_chars(goodbye_prolog, X) ; true. X = [g, o, o, d, b, y, e, '_', p|...] [write] X = [g, o, o, d, b, y, e, '_', p, r, o, l, o, g]
Use the p command to get the default behaviour.
?- set_prolog_flag(toplevel_print_options, [quoted(true), portray(true)]).