As specified in the ISO Prolog standard, include/1
is a directive, not a predicate. GNU Prolog follows the official standard closely, thus you can not use include/1
as a predicate, including in a top-level query. As Sergey explained, if you want to load your programs, you can use the built-in predicate consult/1
or its shortcut ([Fie1, File, ...]
).
To use the include/1 directive in your source files, write it preceded by the (:-)/1
operator. For example:
:- include('tools.pro').