From _nicki@mail.ru Wed May  9 22:24:55 2001
Received: from smtp5.port.ru (mx5.port.ru [194.67.23.40])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f49KOs315629
	for <prolog@swi.psy.uva.nl>; Wed, 9 May 2001 22:24:55 +0200 (MET DST)
Received: from ts2-a110.dial.sovam.com ([195.239.7.238] helo=unemployed)
	by smtp5.port.ru with smtp (Exim 3.14 #6)
	id 14xaVw-000ArD-00; Thu, 10 May 2001 00:24:52 +0400
Message-ID: <003701c0d8c6$64cc9ff0$ee07efc3@unemployed>
From: "??????? ???????" <_nicki@mail.ru>
To: "Jan Wielemaker" <prolog@swi.psy.uva.nl>,
   =?iso-8859-1?Q?Jo=E3o_Mariz?= <joao.mariz@mail.ineti.pt>
References: <3AF97B27.EF061EFD@mail.ineti.pt>
Subject: Re: [SWIPL] That must be because of a Standard
Date: Thu, 10 May 2001 00:26:54 +0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700

Answer is No may be because of
0 is not the same as 0.0
0 <=> int.
0.0 <=> float.

just type
?- 0 = 0.0.

No
?-

Clone your rule with 0(int).
?- assert(my_predicate_with_zero('Yes sure', 0.0)).
?- assert(my_predicate_with_zero('Yes sure', 0)).
or
add term type check    % see "Verify Type of a Term" in Manual.
/Nick/

> Hello Swi-Prolog users,
>
> I am a newbie in SWI-PROLOG, However I have done some work, with another
> Prolog interpreter, which I am now trying to translate.
>
> In the above code, For instance, I previously assert
>
> ?- assert(my_predicate_with_zero('Yes sure', 0.0)).
>
> and then I query the following:
>
> ?- my_predicate_with_zero(X,  0).
>
> I would like to get X='Yes sure',
> However the answer is No.
>
> Can anyone give me some help, or explain me this?
> thanks in advance for any help you can provide,
>
> Joćo






