> > I have this program(a.pl): > > initialization(allfacts(L)). > fact(a). > fact(b). > allfacts(L):- > bagof(fact(A),fact(A),L). > > after doing "gplc a.pl" it created a.exe. First of all, I got a warning > saying "warning: singleton variables [L] for initialization/1",could you > tell me what does this mean? Secondly, when I run a.exe, it opened a > prolog prompt and did not automatically execute > initialization(allfacts(L)). Is it possible so that when I run a.exe, it > does not go into a prolog prompt and just executes "allfacts" and prints > the result to the screen? > > Thank you Daniel :) > > Anthony >
I don't have too much experience with WinDos of late so I can't help you with stdio prebloms, but the "singleton variable", warning is because you are instantiating "L" and then doing nothing with it. If your were to put, say, "write(L)" after the allfacts call, this would cease and you will probably see some output as well. Dhu > > > > ------------------------------ > > _______________________________________________ > Users-prolog mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/users-prolog > > > End of Users-prolog Digest, Vol 40, Issue 1 > ******************************************* >
pgpe7WD7ZLhdc.pgp
Description: PGP signature
_______________________________________________ Users-prolog mailing list [email protected] http://lists.gnu.org/mailman/listinfo/users-prolog
