prolog_flag/[2,3]prolog_flag(*FlagName, *Value)
FlagName is a flag, which currently is set to Value.
prolog_flag(+FlagName, -OldValue, +NewValue)
Unifies the current value of FlagName with OldValue and then sets the value of the flag to NewValue.
Currently, the supported FlagNames and
Values for both prolog_flag/2 and prolog_flag/3 are:
character_escapes
on or off
debugging
trace, debug, zip, or off
fileerrors
on or off
gc
on or off
gc_margin
gc_trace
on or off
unknown
error or fail
syntax_errors
single_var
on or off
discontiguous
on or off
multiple
on or off
Values available only to prolog_flag/2 (query-only) are:
add_ons
'' is
returned.
host_type
prolog_flag is used to create the system
file_search_path/2 facts (see ref-fdi-fsp-pre
and ref-fdi-fsp-sys).
quintus_directory
runtime_directory
version
system_type
development or runtime.
To inspect the value of a
flag without changing it, use prolog_flag/2 or the following
idiom, where FlagName is bound to one of the valid flags above.
| ?- prolog_flag(FlagName, Value, Value).
Use prolog_flag/2 to query and prolog_flag/3 to set values.
prolog_flag/3 can be used to save flag values so that one can
return a flag to its previous state.
For example:
...
prolog_flag(debugging,Old,on), % Save in Old and set
...
prolog_flag(debugging,_,Old), % Restore from Old
...
The read-only prolog_flag/2 flags add_ons,
host_type, quintus_directory, and runtime_directory
represent information set by the qsetpath program. For more
detail on the qsetpath and qgetpath utilities, see
and
.
prolog_flag/2 enumerates all valid
flagnames of a given current value, or all pairs of flags and their
current values. It is not a way to find out non-current values for a
flag.
instantiation_error
prolog_flag/3, FlagName unbound, or
NewValue unbound and not identical to OldValue.
type_error
domain_error
prolog_flag/3, FlagName bound to an atom that does not
represent a supported flag, or
NewValue bound to atom that does not represent a valid value for FlagName.
gc/0,
nogc/0,
style_check/1,
no_style_check/1,
unknown/2,
fileerrors/0,
nofileerrors/0
ref-lps