214 Logic Programming With Prolog
Files The same facilities available for input and output from and to the
user's terminal are available for input and output from and to files
(e.g. on a hard disk or a CD-ROM).
Prolog takes all input from the current input stream and writes all output to
the current output stream. The user may open and close input streams and
output streams associated with any number of named files but there can
only be one current input stream and one current output stream at any time.
Function A relationship between a number of values, such as 6+4 or
sqrt(N), which evaluates to a number (or potentially some other kind
of term), rather than to true or false as for predicates. Prolog does not
make use of functions except in arithmetic expressions (see Chapter
4).
Functor See Term
Goal A component of a query entered by the user at the system prompt,
such as go, animal(X) or factorial(6,M), which either succeeds or fails.
The head of a clause can be viewed as a goal with, in the case of a
rule, the components of its body as subgoals. The components in the
body of a rule are also known as goals. Wherever they appear, goals
always take the form of call terms.
Head of a Clause See Clause
Head of a List See List
Head of a Rule See Clause
Infix Operator A predicate with two arguments written using a special
notation where the functor is placed between its two arguments with
no parentheses, e.g. john likes mary. See also Operator.
Input Stream See Files