- read_term(Stream,Term,Options):
Inputs a term Term from the stream Stream, using options Options. After reaching the end of file, it unifies Term with end_of_file. The Options is a list of options that can include:
- variables(V_list) - After reading a term, V_list will be unified with the list of variables that occur in the term.
- variable_names(VN_list) - After reading a term, VN_list will be unified with a list of elements in the form of N = V, where V is a variable occurring in the term, and N is the name of V.
- singletons(VS_list) - After reading a term, VS_list will be unified with a list of elements in the form N = V, where V is a singleton variable in Term, and N is its name.
- read_term(Term,Options):
This is the same as read_term(Stream,Term,Options), except that the current input stream is used.
- read(Stream,Term):
This is equivalent to read_term(Stream,Term),[]).
- read(Term):
This is equivalent to read_term(Term,[]).
- write_term(Stream,Term,Options):
Outputs a term Term into a stream Stream, using the option list Options. The list of options Options can include8.5:
- quoted(Bool) - When Bool is true, each atom and functor is quoted, such that the term can be read by read/1.
- ignore_ops(Bool) - When Bool is true, each compound term is output in functional notation, i.e., in the form of f(A1,...,An), where f is the functor, and Ai (i=1,...,n) are arguments.
- write_term(Term,Options):
This is the same as write_term(Stream,Term,Options), except that the current output stream is used.
- write(Stream,Term):
This is equivalent to write_term(Stream,Term,[]).
- write(Term):
This is equivalent to
current_output(Stream),write(Stream,Term).
- write_canonical(Stream,Term):
This is equivalent to
write_term(Stream,Term,[quoted(true),ignore_ops(true)]).
- write_canonical(Term):
This is equivalent to
current_output(Stream),write_canonical(Stream,Term).
- writeq(Stream,Term):
This is equivalent to
write_term(Stream,Term,[quoted(true)]).
- writeq(Term):
This is equivalent to
current_output(Stream),writeq(Stream,Term).
- portray_clause(Clause):
- portray_clause(Stream,Clause):
After the variables in Clause are numbered, writes Clause with the body indented, the same as in listing.
- op(Priority,Specifier,Name):
Makes atom Name an operator of type Specifier and priority Priority8.6.
Specifier specifies the class (prefix, infix or postfix) and the associativity, which can be:
- fx - prefix, non-associative.
- fy - prefix, right-associative.
- xfx - infix, non-associative.
- xfy - infix, right-associative.
- yfx - infix, left-associative.
- xf - postfix, non-associative.
- yf - postfix, left-associative.
The priority of an operator is an integer greater than 0 and less than 1201. The lower the priority, the stronger the operator binds its operands.
- current_op(Priority,Specifier,Operator):
This predicate is true if Operator is an operator with properties that are defined by a specifier Specifier and precedence Priority.