This is such a small thing, but I had never noticed this before.

In other Prologs it is possible to add a line such as

:-['some_file.p'].

at the top of a file and the file is consulted in the usual way. But it seems Gnu Prolog does not allow this? When I try I get "Unknown directive '.'/2 - maybe use initialization/1 - directive ignored"

If I then do as suggested with

:-initialization(['some_file.p']).

it works as expected.

Since initialization/1 is an ISO directive I wonder, is this a more preferred way of doing this? And the other way is discouraged to the point where GNU Prolog does not even support it?


Reply via email to