Re: not()

Jasper Taylor <[email protected]>
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
On Tuesday 01 May 2007 18:14:00 Guido Leisker wrote:
> I created a file test.pro:
>
> ---test.pro---
> female(anita).
> male(X) :- not(female(X)).
> --------------

It is not a bug. The GNU-prolog manual does not mention a not() predicate. The 
unary operator \+ does negation-by-failure, so your program should be:

female(anita).
male(X) :- \+ female(X).

Cheers
	--Jasper
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.