Help for PROLOG syntax

From: angtc11 (angtc11_at_hotmail-dot-com.no-spam.invalid)
Date: 02/25/05


Date: 25 Feb 2005 13:57:35 -0600

Hi

I am a beginner in PROLOG and have this question. How do I return a
'yes' or a 'no' togther with the answer to a variable?

For eg.

drink(coffee).
drink(tea).
drink(coke).

sweet(coke).

Lets say I wish to query drink(X) and it has to return whether it is
sweet, together with the name, like

X=coffee
no

X=tea
no

X=coke
yes

Is this possbile?
Thanks in advance!

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
                http://www.usenet.com