Unexpected results to basic query.

Aug 19, 2012 at 5:27 PM

Hi

Newbie question.

Created four facts:

good(egg).

good(onion).

bad(bacon).

bad(chocolate).

 

Then created query:

?- good(X).

 

Expected:

X=egg;

X=onion

 

Got:

Unrecognized input specified.

 

What am I doing wrong?

Aug 19, 2012 at 5:31 PM

Sorry, just read the manual: should have used ":" instead of the standard "?" ie

 

:- good(X)

rather than:

?- good(X)