=
?Y ISOZ=Z.
; i.e. X and
Y are unified.
\=
?Y ISOThe same as \+
X =
Y; i.e. X and Y are
not unifiable.
unify_with_occurs_check(
?X,
?Y)
ISOlength(
?List,
?Length)
If List is of indeterminate length and Length is instantiated to an integer, then List will be unified with a list of length Length. The list elements are unique variables.
If Length is unbound then Length will be unified
with all possible lengths of List.
numbervars(
?Term,
+N,
?M)
meta-logicalwrite(
Term)
(or
writeq(
Term)
) (see Term I/O) prints those
variables as (`A' + (i mod 26))(i/26) where
i ranges from N to M-1. N must be
instantiated to an integer. If it is 0 you get the variable
names A, B, ..., Z, A1, B1, etc. This predicate is used by
listing/[0,1]
(see State Info).
undo(
:Goal)
Note that this operation is immune to cuts. That is,
undo/1
does not behave as if it were defined by:
weak_undo(_). weak_undo(Goal) :- Goal, fail.
since defining it that way would not guarantee that Goal be executed on backtracking.
Note also that the Prolog top-level operates as a read-call-fail loop,
and backtracks implicitly for each new query. Raised
exceptions and the predicates halt/0
and abort/0
cause implicit backtracking as well.
halt
ISOhalt(
+Code)
ISOop(
+Precedence,
+Type,
+Name)
ISOcurrent_op(
?Precedence,
?Type,
?Op)
ISObreak
developmentabort
save_files(
+SourceFiles,
+FileSpec)
source_file/[1,2]
for the
relevant predicates and modules is also saved.
If FileSpec does not have an explicit suffix, the suffix
`.po' will be appended to it. SourceFiles should denote a
single file or a list of files. FileSpec can later be
loaded by load_files/[1,2]
, at which time any saved
directives will be re-executed. If any of the SourceFiles
declares a module, FileSpec too will behave as a
module-file and export the predicates listed in the
first module declaration encountered in SourceFiles.
See Saving.
save_modules(
+Modules,
+FileSpec)
If FileSpec does not have an explicit suffix, the suffix
`.po' will be appended to it. Modules should denote a single
module or a list of modules. FileSpec can later
be loaded by load_files/[1,2]
and will behave as a
module-file and export any predicates exported
by the first module in Modules. See Saving.
save_predicates(
:Spec,
+FileSpec)
If FileSpec does not have an explicit suffix, the suffix
`.po' will be appended to it. FileSpec can later be
loaded by load_files/[1,2]
. See Saving.
save_program(
+FileSpec)
save_program(
+FileSpec,
:Goal)
true
. See Saving.
restore(
+FileSpec)
restore/1
may succeed, fail or raise an exception depending on
Goal. See Saving.
garbage_collect
garbage_collect_atoms
gc
obsolescentnogc
obsolescentprompt(
?Old,
?New)
prompt(X,
X)
unifies the current prompt with X, without changing it.
Note that this predicate only affects the prompt given when a
user's program is trying to read from the standard input
stream (e.g. by calling read/1
). Note also that the
prompt is reset to the default `|: ' on return to top-level.
version
development,obsolescentProlog will display its own introductory message upon startup by calling
version/0
. If this message is required at some other time it can
be obtained using this predicate, which displays a list of
introductory messages; initially this list comprises only one message
(Prolog's), but you can add more messages using version/1
.
version(
+Message)
development,obsolescentversion/0
. Message must be an atom.
The idea of this message list is that, as systems are constructed on top
of other systems, each can add its own identification to the message
list. Thus version/0
should always indicate which modules
make up a particular package. It is not possible to remove messages
from the list.
help
hookable,development,obsolescentuser:user_help/0
, and only if that call fails is a default
help message printed on the current output stream.
user_help
hook,obsolescentuser:user_help