The current system defines 2 different mechanisms to query and/or set properties of the environment: flag/3 and feature/2 as well as a number of special purpose predicates of which unknown/2, fileerrors/2 are examples. The ISO standard defines prolog_flag. It is likely that all these global features will be merged into a single in the future.
true
. Currently defined keys:
10000 × Major + 100 × Minor + PatchNote that in releases upto 2.7.10 this feature yielded an atom holding the three numbers separated by dots. The current representation is much easier for implementing version-conditional statements.
<home>/startup/startup.<arch>
and to find its library as <home>/library
.
Systems using `sparse-memory management' are a bit faster as there is no stack-shifter, and checking the stack-boundary is often realised by the hardware using a `guard-page'. Also, memory is actually returned to the system after a garbage collection or call to trim_stacks/0 (called by prolog/0 after finishing a user-query).
\
escape sequences in quoted atoms and strings.
May be changed.
Functor(arg)
is read as if it
was written 'Functor'(arg)
. Some applications use the
Prolog read/1
predicate for reading an application defined script language. In these
cases, it is often difficult to explain none-Prolog users of the
application that constants and functions can only start with a lowercase
letter. Variables can be turned into atoms starting with an uppercase
atom by calling read_term/2
using the option variable_names
and binding the variables
to their name. Using this feature, F(x) can be turned into valid syntax
for such script languages. Suggested by Robert van Engelen. SWI-Prolog
specific.
readline
) and 15 otherwise.
true
, compile in optimised mode. The initial value is
true
if Prolog was started with the -O
commandline option.
Currently optimise compilation implies compilation of arithmetic, and deletion of redundant true/0 that may result from expand_goal/2.
Later versions might imply various other optimisations such as integrating small predicates into their callers, eliminating constant expressions and other predictable constructs. Source code optimisation is never applied to predicates that are declared dynamic (see dynamic/1).
true
(default) autoloading of library functions is
enabled. See section 2.12.
true
the normal consult message will be printed if a
library is autoloaded. By default this message is suppressed. Intended
to be used for debugging purposes.
//
and rem
arithmetic functions. Value depends on the C-compiler used.
true
(default false
), expand $varname
and ~
in arguments of builtin-predicates that accept a file
name (open/3, exists_file/1, access_file/2,
etc.). The predicate
expand_file_name/2
should be used to expand environment variables and wildcard patterns.
This feature is intended for backward compatibility with older versions
of SWI-Prolog.
__unix__
or unix
.