:-/1
Headless Clause operator, causing the body of the clause to be executed while consulting the current file.
:- (BODY of CLAUSES).
Compatibility: LPA Win-Prolog, all decent Prologs.
Remarks:
In the original "P.I.E." inference engine by PDC, it was not possible to achieve this operation, which is quite common in Prolog implementations. However, a lot of existing Prolog source-code often contains headless clauses, preceded by the ":-" operator, and they are executed every time the program is consulted. Typically, such clauses contain statements like "consult(...)" and are used to load include-files that are necessary for the current file's operation. Furthermore, the presence of such clauses enables programs to run as soon as they are loaded, if there is a headless "goal" section at the end of the source-code preceded by the ":-" operator.