Merge branch 'master' of yap.dcc.fc.up.pt:yap-6
This commit is contained in:
commit
ca879522b7
57
docs/yap.tex
57
docs/yap.tex
@ -1701,7 +1701,7 @@ if they have not been loaded before, does nothing otherwise.
|
|||||||
|
|
||||||
@var{F} must be a list containing the names of the files to load.
|
@var{F} must be a list containing the names of the files to load.
|
||||||
|
|
||||||
@item make [ISO]
|
@item make
|
||||||
@findex make/0
|
@findex make/0
|
||||||
@snindex make/0
|
@snindex make/0
|
||||||
@cnindex make/0
|
@cnindex make/0
|
||||||
@ -2719,7 +2719,7 @@ between 0 and 10.
|
|||||||
@cnindex call_with_args/n
|
@cnindex call_with_args/n
|
||||||
Meta-call where @var{Name} is the name of the procedure to be called and
|
Meta-call where @var{Name} is the name of the procedure to be called and
|
||||||
the @var{Ai} are the arguments. The number of arguments varies between 0
|
the @var{Ai} are the arguments. The number of arguments varies between 0
|
||||||
and 10.
|
and 10. New code should use @code{call/N} for better portability.
|
||||||
|
|
||||||
If @var{Name} is a complex term, then @code{call_with_args/n} behaves as
|
If @var{Name} is a complex term, then @code{call_with_args/n} behaves as
|
||||||
@code{call/n}:
|
@code{call/n}:
|
||||||
@ -3179,7 +3179,7 @@ Checks whether @var{T} is a database reference.
|
|||||||
@cnindex float/1
|
@cnindex float/1
|
||||||
Checks whether @var{T} is a floating point number.
|
Checks whether @var{T} is a floating point number.
|
||||||
|
|
||||||
@item rational(@var{T}) [ISO]
|
@item rational(@var{T})
|
||||||
@findex rational/1
|
@findex rational/1
|
||||||
@syindex rational/1
|
@syindex rational/1
|
||||||
@cyindex rational/1
|
@cyindex rational/1
|
||||||
@ -3412,15 +3412,7 @@ will return:
|
|||||||
The predicate holds when at least one of the arguments is ground
|
The predicate holds when at least one of the arguments is ground
|
||||||
(otherwise, an error message will be displayed). The argument @var{A} must
|
(otherwise, an error message will be displayed). The argument @var{A} must
|
||||||
be unifiable with an atom, and the argument @var{L} with the list of the
|
be unifiable with an atom, and the argument @var{L} with the list of the
|
||||||
ASCII codes for the characters of the external representation of @var{A}.
|
characters of @var{A}.
|
||||||
|
|
||||||
The ISO-Prolog standard dictates that @code{atom_chars/2} should unify
|
|
||||||
the second argument with a list of one-char atoms, and not the character
|
|
||||||
codes. For compatibility with previous versions of YAP, and
|
|
||||||
with other Prolog implementations, YAP unifies the second
|
|
||||||
argument with the character codes, as in @code{atom_codes/2}. Use the
|
|
||||||
@code{set_prolog_flag(to_chars_mode,iso)} to obtain ISO standard
|
|
||||||
compatibility.
|
|
||||||
|
|
||||||
@item atom_codes(?@var{A},?@var{L}) [ISO]
|
@item atom_codes(?@var{A},?@var{L}) [ISO]
|
||||||
@findex atom_codes/2
|
@findex atom_codes/2
|
||||||
@ -3498,7 +3490,7 @@ concatenated are the representation for @var{A12}.
|
|||||||
If @var{A1} and @var{A2} are unbound, the built-in will find all the atoms
|
If @var{A1} and @var{A2} are unbound, the built-in will find all the atoms
|
||||||
that concatenated give @var{A12}.
|
that concatenated give @var{A12}.
|
||||||
|
|
||||||
@item number_chars(?@var{I},?@var{L})
|
@item number_chars(?@var{I},?@var{L}) [ISO]
|
||||||
@findex number_chars/2
|
@findex number_chars/2
|
||||||
@saindex number_chars/2
|
@saindex number_chars/2
|
||||||
@cnindex number_chars/2
|
@cnindex number_chars/2
|
||||||
@ -3506,15 +3498,7 @@ that concatenated give @var{A12}.
|
|||||||
The predicate holds when at least one of the arguments is ground
|
The predicate holds when at least one of the arguments is ground
|
||||||
(otherwise, an error message will be displayed). The argument @var{I} must
|
(otherwise, an error message will be displayed). The argument @var{I} must
|
||||||
be unifiable with a number, and the argument @var{L} with the list of the
|
be unifiable with a number, and the argument @var{L} with the list of the
|
||||||
ASCII codes for the characters of the external representation of @var{I}.
|
characters of the external representation of @var{I}.
|
||||||
|
|
||||||
The ISO-Prolog standard dictates that @code{number_chars/2} should unify
|
|
||||||
the second argument with a list of one-char atoms, and not the character
|
|
||||||
codes. For compatibility with previous versions of YAP, and
|
|
||||||
with other Prolog implementations, YAP unifies the second
|
|
||||||
argument with the character codes, as in @code{number_codes/2}. Use the
|
|
||||||
@code{set_prolog_flag(to_chars_mode,iso)} to obtain ISO standard
|
|
||||||
compatibility.
|
|
||||||
|
|
||||||
@item number_codes(?@var{A},?@var{L}) [ISO]
|
@item number_codes(?@var{A},?@var{L}) [ISO]
|
||||||
@findex number_codes/2
|
@findex number_codes/2
|
||||||
@ -4350,23 +4334,23 @@ these options:
|
|||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
|
|
||||||
@item type(+@var{T})
|
@item type(+@var{T}) [ISO]
|
||||||
Specify whether the stream is a @code{text} stream (default), or a
|
Specify whether the stream is a @code{text} stream (default), or a
|
||||||
@code{binary} stream.
|
@code{binary} stream.
|
||||||
|
|
||||||
@item reposition(+@var{Bool})
|
@item reposition(+@var{Bool}) [ISO]
|
||||||
Specify whether it is possible to reposition the stream (@code{true}), or
|
Specify whether it is possible to reposition the stream (@code{true}), or
|
||||||
not (@code{false}). By default, YAP enables repositioning for all
|
not (@code{false}). By default, YAP enables repositioning for all
|
||||||
files, except terminal files and sockets.
|
files, except terminal files and sockets.
|
||||||
|
|
||||||
@item eof_action(+@var{Action})
|
@item eof_action(+@var{Action}) [ISO]
|
||||||
Specify the action to take if attempting to input characters from a
|
Specify the action to take if attempting to input characters from a
|
||||||
stream where we have previously found an @code{end_of_file}. The possible
|
stream where we have previously found an @code{end_of_file}. The possible
|
||||||
actions are @code{error}, that raises an error, @code{reset}, that tries to
|
actions are @code{error}, that raises an error, @code{reset}, that tries to
|
||||||
reset the stream and is used for @code{tty} type files, and @code{eof_code},
|
reset the stream and is used for @code{tty} type files, and @code{eof_code},
|
||||||
which generates a new @code{end_of_file} (default for non-tty files).
|
which generates a new @code{end_of_file} (default for non-tty files).
|
||||||
|
|
||||||
@item alias(+@var{Name})
|
@item alias(+@var{Name}) [ISO]
|
||||||
Specify an alias to the stream. The alias @t{Name} must be an atom. The
|
Specify an alias to the stream. The alias @t{Name} must be an atom. The
|
||||||
alias can be used instead of the stream descriptor for every operation
|
alias can be used instead of the stream descriptor for every operation
|
||||||
concerning the stream.
|
concerning the stream.
|
||||||
@ -4551,14 +4535,14 @@ Send out all data in the output buffer of the current output stream.
|
|||||||
@cnindex flush_output/1
|
@cnindex flush_output/1
|
||||||
Send all data in the output buffer for stream @var{S}.
|
Send all data in the output buffer for stream @var{S}.
|
||||||
|
|
||||||
@item set_input(+@var{S})
|
@item set_input(+@var{S}) [ISO]
|
||||||
@findex set_input/1
|
@findex set_input/1
|
||||||
@syindex set_input/1
|
@syindex set_input/1
|
||||||
@cnindex set_input/1
|
@cnindex set_input/1
|
||||||
Set stream @var{S} as the current input stream. Predicates like @code{read/1}
|
Set stream @var{S} as the current input stream. Predicates like @code{read/1}
|
||||||
and @code{get/1} will start using stream @var{S}.
|
and @code{get/1} will start using stream @var{S}.
|
||||||
|
|
||||||
@item set_output(+@var{S})
|
@item set_output(+@var{S}) [ISO]
|
||||||
@findex set_output/1
|
@findex set_output/1
|
||||||
@syindex set_output/1
|
@syindex set_output/1
|
||||||
@cnindex set_output/1
|
@cnindex set_output/1
|
||||||
@ -4921,16 +4905,16 @@ Displays term @var{T} on the current output stream, according to the
|
|||||||
following options:
|
following options:
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item quoted(+@var{Bool})
|
@item quoted(+@var{Bool}) [ISO]
|
||||||
If @code{true}, quote atoms if this would be necessary for the atom to
|
If @code{true}, quote atoms if this would be necessary for the atom to
|
||||||
be recognized as an atom by YAP's parser. The default value is
|
be recognized as an atom by YAP's parser. The default value is
|
||||||
@code{false}.
|
@code{false}.
|
||||||
|
|
||||||
@item ignore_ops(+@var{Bool})
|
@item ignore_ops(+@var{Bool}) [ISO]
|
||||||
If @code{true}, ignore operator declarations when writing the term. The
|
If @code{true}, ignore operator declarations when writing the term. The
|
||||||
default value is @code{false}.
|
default value is @code{false}.
|
||||||
|
|
||||||
@item numbervars(+@var{Bool})
|
@item numbervars(+@var{Bool}) [ISO]
|
||||||
If @code{true}, output terms of the form
|
If @code{true}, output terms of the form
|
||||||
@code{'$VAR'(N)}, where @var{N} is an integer, as a sequence of capital
|
@code{'$VAR'(N)}, where @var{N} is an integer, as a sequence of capital
|
||||||
letters. The default value is @code{false}.
|
letters. The default value is @code{false}.
|
||||||
@ -5540,7 +5524,7 @@ input stream.
|
|||||||
@cnindex tab/2
|
@cnindex tab/2
|
||||||
The same as @code{tab/1}, but using stream @var{S}.
|
The same as @code{tab/1}, but using stream @var{S}.
|
||||||
|
|
||||||
@item nl(+@var{S})
|
@item nl(+@var{S}) [ISO]
|
||||||
@findex nl/1
|
@findex nl/1
|
||||||
@syindex nl/1
|
@syindex nl/1
|
||||||
@cnindex nl/1
|
@cnindex nl/1
|
||||||
@ -5914,8 +5898,8 @@ predicates:
|
|||||||
@findex assert/1
|
@findex assert/1
|
||||||
@saindex assert/1
|
@saindex assert/1
|
||||||
@caindex assert/1
|
@caindex assert/1
|
||||||
Adds clause @var{C} to the program. If the predicate is undefined,
|
Same as @code{assertz/1}. Adds clause @var{C} to the program. If the predicate is undefined,
|
||||||
declare it as dynamic.
|
declare it as dynamic. New code should use @code{assertz/1} for better portability.
|
||||||
|
|
||||||
Most Prolog systems only allow asserting clauses for dynamic
|
Most Prolog systems only allow asserting clauses for dynamic
|
||||||
predicates. This is also as specified in the ISO standard. YAP allows
|
predicates. This is also as specified in the ISO standard. YAP allows
|
||||||
@ -6105,7 +6089,7 @@ name is the atom @var{A}.
|
|||||||
Defines the relation: @var{P} is a built-in predicate whose name
|
Defines the relation: @var{P} is a built-in predicate whose name
|
||||||
is the atom @var{A}.
|
is the atom @var{A}.
|
||||||
|
|
||||||
@item predicate_property(@var{P},@var{Prop})
|
@item predicate_property(@var{P},@var{Prop}) [ISO]
|
||||||
@findex predicate_property/2
|
@findex predicate_property/2
|
||||||
@saindex predicate_property/2
|
@saindex predicate_property/2
|
||||||
@cnindex predicate_property/2
|
@cnindex predicate_property/2
|
||||||
@ -8178,7 +8162,8 @@ this version of YAP either defines @code{__unix__} or @code{unix}.
|
|||||||
@item unknown [ISO]
|
@item unknown [ISO]
|
||||||
@findex unknown (yap_flag/2 option)
|
@findex unknown (yap_flag/2 option)
|
||||||
@*
|
@*
|
||||||
Corresponds to calling the @code{unknown/2} built-in.
|
Corresponds to calling the @code{unknown/2} built-in. Possible values
|
||||||
|
are @code{error}, @code{fail}, and @code{warning}.
|
||||||
|
|
||||||
@item update_semantics
|
@item update_semantics
|
||||||
@findex update_semantics (yap_flag/2 option)
|
@findex update_semantics (yap_flag/2 option)
|
||||||
|
Reference in New Issue
Block a user