Go to the first, previous, next, last section, table of contents.

Notational conventions

When referring to keyboard characters, printing characters are written thus: a, while control characters are written like this: ^A. Thus ^C is the character you get by holding down the CTL key while you type c. Finally, the special control characters carriage-return, line-feed and space are often abbreviated to RET, LFD and SPC respectively.

When introducing a built-in predicate, we shall present its usage with a mode spec which has the form name(arg, ..., arg) where each arg denotes how that argument should be instantiated in goals, and has one of the following forms:

The argument should in the program correspond to a goal.
The value of the argument should not be a variable.
The value of argument should be a variable.
No constraint on this argument.

In the context of some directives, we shall need the following notation: Predicates in Prolog are distinguished by their name and their arity. The notation name/arity is therefore used when it is necessary to refer to a predicate unambiguously; e.g. concatenate/3 specifies the predicate which is named "concatenate" and which takes 3 arguments.

More generaly, a predicate spec may be

the elementary form
a Prolog list of elementary forms
a comma-separated list of predicate specifications
a dcg predicate spec to refer to DCG predicates

Go to the first, previous, next, last section, table of contents.