Hi All. I'm moving the first steps in the world of logic programming and I've installed on MacOS X 10.6.3 the GNU prolog 1.3.1 compiler.
To teach myself in Prolog I'm reading the book "Learn Prolog Now". In this book i've found some simple knowledge base and i've used the gprolog to test some example. I've created the file test2.pl with the following content: listensToMusic(mia). happy(yolanda). playsAirGuitar(mia) :- listensToMusic(mia). playsAirGuitar(yolanda) :- listensToMusic(yolanda). listensToMusic(yolanda):- happy(yolanda). and I've loaded it in to interpreter typing [test2]. now the book is telling me that if I type at the prompt the query: ?- playsAirGuitar(yolanda). the result i obtain is "yes". My problem is that the result I obtain is a big "no". Now, as student, I'm a bit confused. Who is right and who is wrong? The book or the interpreter? Thanks in advance for any help. Luca. _______________________________________________ Users-prolog mailing list [email protected] http://lists.gnu.org/mailman/listinfo/users-prolog
