1.2 Mode Spec

When describing a predicate, we present its usage with a mode spec, which has the form name(arg, ..., arg), where each arg denotes how that argument is used by the predicate, and has one of the following forms:

:ArgName
The argument is used as a term denoting a goal or a clause or a predicate name, or that otherwise needs special handling of module prefixes. It is is subject to module name expansion (see ref-mod-mne).
+ArgName
The argument is an input argument. Usually, but not always, this implies that the argument should be instantiated.
-ArgName
The argument is an output argument. Usually, but not always, this implies that the argument should be uninstantiated.
?ArgName
The argument may be used for both input and output.

Please note: The reference pages for built-in predicate use slightly different mode specs.


Send feedback on this subject.