User-question

From: Marc Wamser (mawa_at_web.de)
Date: 10/02/04


Date: Sat, 2 Oct 2004 20:29:46 +0200

Hello,

I defined this rule:

"askUser(P) :- write('Yes or no?'), (read(Answer)="yes" -> P=true; P=fail)."

which doesn't work...

I want to ask the User. When he answers "yes" then P should be "true" so
that the rule succeeds. Otherwise it shall fail.

How can I write it correctly?

Thanks,

Marc