When a program is to be loaded, it is sometimes necessary to tell the system to treat some of the predicates specially. This information is supplied by including declarations about such predicates in the source file, preceding any clauses for the predicates that they concern. A declaration is written just as a directive is, beginning with ‘:-’. A declaration is effective from its occurrence through the end of file.
Although declarations that affect more than one predicate may be collapsed into a single declaration, the recommended style is to write the declarations for a predicate immediately before its first clause.
Operator declarations are not declarations proper, but rather directives that modify the global table of syntax operators. Operator declarations are executed as they are encountered while loading programs.
The rest of this section details the available forms of predicate declarations.
|• Multifile Declarations||Multifile Declarations|
|• Dynamic Declarations||Dynamic Declarations|
|• Volatile Declarations||Volatile Declarations|
|• Discontiguous Declarations||Discontiguous Declarations|
|• Block Declarations||Block Declarations|
|• Meta-Predicate Declarations||Meta-Predicate Declarations|
|• Module Declarations||Module Declarations|
|• Public Declarations||Public Declarations|
|• Mode Declarations||Mode Declarations|
|• Is2 Declarations||is/2 Declarations|
|• Include Declarations||Include Declarations|