bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: not()


From: Guido Leisker
Subject: Re: not()
Date: Fri, 04 May 2007 12:37:00 +0200

On Wed, 2007-05-02 at 09:47 +0100, Jasper Taylor wrote:
> 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
> 

Oh, thank you very much!

Guido





reply via email to

[Prev in Thread] Current Thread [Next in Thread]