I am stuck doing something which I thought was going to be simple, but now I am 
not sure if it is possible.

Let's say I have a predicate like so.

    something(X):-
        write(X), nl.

And I use op/3 like so

    op(1150, fx, something).

I expect that I can now use this as a new directive such as

:-something(abc).

But this does not work. I simply get an error

    warning: unknown directive (something)/1 - maybe use initialization/1 - 
directive ignored

Of course using

    :-initialization(something(abc)).

will work.

Is it simply not possible to define a new directive in GNU Prolog? Or am I 
making an error somewhere?



Reply via email to