The Mode of an argument

ISO Prolog defines modes for arguments as follows:
The argument shall be instantiated.
The argument shall remain unaltered. Unless the argument is a compound term this is the same as the mode   +.
The argument shall be a variable that will be instantiated if the goal succeeds.
The argument shall be instantiated or a variable. The ISO standard requires that
  1. if the argument is instantiated, and
  2. the type of the instantiated argument is not that required by the template of the predicate
then an error is to be raised.
The argument is a meta argument that is subject to module qualifcation when the predicate is called. The mode * is used in metapredicate mode indicators to denote that an argument is not a meta-argument


A template specifies the mode and type of each argument of a predicate. The types used in th estandard are as follows:

atom -- an atom
atom_or_atom_list -- an atom or a list of atoms
atomic -- an atomic term
byte -- a byte
character -- a one char atom
character_code -- a character code
character_code_list -- a list of character codes
character_list -- a list of characters
close_options -- a list of close options
evaluable -- an expression
flag -- a flag
head of a clause
in_byte a byte or -1
in_character a one char atom or the atom end_of_file
in_character_code -- a character code or -1
io_mode -- an input output mode
nonvar -- an atomic term or a compound term
operator_specifier -- one of the atoms xf, yf, xfx, xfy, yfx, fx, fy
read_options_list a read options list
stream_options -- a list of stream_options
stream_or_alias -- a stream or an alias
stream_position -- a steam position
stream_property -- a stream property
write_options_list -- a write options list

Author: J.P.E. Hodgson
Inria Rocquencourt
78153 Le Chesnay Cedex

Saint Joseph's University
Philadelphia PA 19131

Last Changed: 1999/03/09