Prolog flags enable you to modify certain aspects of Prolog's
behavior, as outlined below. This is accomplished by using
prolog_flag/3
. If you simply want to query the value of a flag,
use prolog_flag/2
.
By using the prolog flags listed below, it is possible to:
character_escapes
debugging
prolog_flag/3
or by using the predicates trace/0
,
debug/0
, notrace/0
, and nodebug/0
.
fileerrors
fileerrors
flag by using
prolog_flag/3
or by using the pair of predicates
fileerrors/0
and nofileerrors/0
.
gc
prolog_flag/3
or by using the predicates gc/0
and nogc/0
.
gc_margin
gc_trace
multiple
single_var
syntax_error
unknown
prolog_flag/3
or unknown/2
(see dbg-bas-con-unk).
unknown/2
writes a message to user_output
saying what the new
state is. It is intended for use at the top level.
prolog_flag/3
does not write a message. It is intended for
use in code.
For further details, see the reference page. Also see ref-mgc for more detailed descriptions of the garbage collection flags.
To inspect the value of a flag without changing it, one can say
| ?- prolog_flag(FlagName, Value).
You can use prolog_flag/2
to enumerate all the FlagNames that
the system currently understands, together with their current values.