permission_error
. If the provided Value does not
match the type of the flag, a type_error
is raised.
Some flags (e.g., unknown) are maintained on a per-module basis. The addressed module is determined by the Key argument.
In addition to ISO, SWI-Prolog allows for user-defined Prolog flags.
The type of the flag is determined from the initial value and cannot be
changed afterwards. Defined types are boolean
(if the
initial value is one of false
, true
, on
or off
),
atom
if the initial value is any other atom, integer
if the value is an integer that can be expressed as a 64-bit signed
value. Any other initial value results in an untyped flag that can
represent any valid Prolog term.
The behaviour when Key denotes a non-existent key depends on the Prolog flag user_flags. The default is to define them silently. New code is encouraged to use create_prolog_flag/3 for portability.