Help: I want the whole answer
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
prolog-flag 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)]
The option 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 it says [write]).
?- atom_chars(goodbye_prolog, X). 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.
The debugger has the options w and p to switch between
writeq/1 (quoted write without portray) and print/1 (use the
toplevel_print_options options).
Changing default?
Add a set_prolog_flag/2 directive in your prolog personal initialisation file (see PlInitialisation) to change the default the above mentioned prolog flags. E.g. to disable abbreviation, use:
?- set_prolog_flag(toplevel_print_options,
[quoted(true), portray(true)]).