PDA

View Full Version : Coding prolog question.



Balain
2014-04-11, 06:04 PM
I have to write a simple little text game in prolog. It is coming along okay so far. I am using ...,fail. for each command so it doesn't wait for user to type . or ; with a true rule right after.

As an Example:


...

play :- nl,nl,
write('At any time you can type help to get a list of commands.'),nl,nl,
write('blah blah blah blah blah blah....'),look.
play.


....



this works fine but now after every command prolog returns true. Is there a way in prolog to not echo true after each command?

hajo
2014-04-23, 09:57 PM
I have to write a simple little text game in prolog. ... Is there a way in prolog to not echo true after each command?

I have no idea.
But there is a new release of swi-prolog (http://portableapps.com/news/2014-04-23--swi-prolog-portable-6.6.4-released) at portableapps, and they have some tutorials on their homepage...