I'm always looking for the way make the
Prolog Toplevel printer print lists in full
OutColl = [0xE3,0x82,0xA2,0xE3,0x82,0xA4,0xE3,0x82,0xA6|...].
OutColl = [0xE3,0x82,0xA2,0xE3,0x82,0xA4,0xE3,0x82,0xA6,0xE3,0x82,0xA8,0xE3,0x82,0xAA].
And the command is:
or even unset any depth limit:
You may want to add add the above as directives to the initialization file
Also of interest:
set_prolog_flag(backtrace_depth,100). % prints more stacktrace set_prolog_flag(backtrace_goal_depth,10). % prints more of the terms (e.g. depth of lists in arguments)
An example for SWI Prolog reading ",," as a "," followed by a separating ",", while "iso" handling demands to at least quote the first comma:
f(A,B):-format("~w and then ~w\n",[A,B]). ?- f(,,a). , and then a true. ?- set_prolog_flag(iso,true). true. ?- f(,,a). ERROR: Syntax error: Operand expected, unquoted comma or bar found
SWI Prolog strings modes
Doc Needs Help
- "answer_write_options" is somehow lost in between "toplevel_print_factorized" and "toplevel_prompt".
- also, the option names are not found when searching and/or have no links that can be used to refer to them: "answer_write_options" -> no matches.
"This flag determines how double quoted strings are read by Prolog and is ---like character_escapes and back_quotes--- maintained for each module."
"...scoped to each module, which means that the interpretation of the source code of the module is read according to the value of that flag."
(although, thinking a bit about this, when you call
foo("xyz") of a predicate from a module that has the "double_quotes" flag set to "chars", will that predicate be called with a list of characters instead of a String? Going the other way, if the predicate constrains a variable to "xyz" in that module's code, I would say it arrives as list of characters for sure?)
"The default is string, which produces a string as described in section 5.2. If --traditional is given, the default is codes,"
If "--traditional" is given on the command line (see https://eu.swi-prolog.org/pldoc/man?section=running-options ), the default is 'codes',..."
++ This page could really become more legible if the flags were divided up by subject domain.