From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roland Orre Newsgroups: gmane.lisp.guile.bugs Subject: Re: scm_num_eq Date: Fri, 23 Jan 2004 09:35:39 +0100 Organization: NeuroLogic Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: <1074846939.23547.747.camel@localhost> References: <1074819318.23546.317.camel@localhost> <8765f34fz3.fsf@zagadka.ping.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074847391 2389 80.91.224.253 (23 Jan 2004 08:43:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2004 08:43:11 +0000 (UTC) Cc: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Jan 23 09:43:00 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ajwu4-00031m-00 for ; Fri, 23 Jan 2004 09:43:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ajwtc-0000hX-NW for guile-bugs@m.gmane.org; Fri, 23 Jan 2004 03:42:32 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Ajwsb-0000O9-5C for bug-guile@gnu.org; Fri, 23 Jan 2004 03:41:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Ajws2-0000GX-I7 for bug-guile@gnu.org; Fri, 23 Jan 2004 03:41:25 -0500 Original-Received: from [217.70.33.37] (helo=lists.levonline.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ajws2-0000GS-73 for bug-guile@gnu.org; Fri, 23 Jan 2004 03:40:54 -0500 Original-Received: from localhost (lists.levonline.com [127.0.0.1]) by lists.levonline.com (Postfix) with ESMTP id B3A72D07D3; Fri, 23 Jan 2004 09:40:52 +0100 (CET) Original-Received: from lists.levonline.com ([127.0.0.1]) by localhost (lists.levonline.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32313-09; Fri, 23 Jan 2004 09:40:52 +0100 (CET) Original-Received: from ormen2.basenet.levonline.com (ormen2.levonline.com [217.70.32.118]) by lists.levonline.com (Postfix) with ESMTP id 0931CD07D0; Fri, 23 Jan 2004 09:40:52 +0100 (CET) Original-Received: from bari.bacon.su.se (bari.bacon.su.se [130.237.152.231]) (authenticated bits=0) by ormen2.basenet.levonline.com (8.12.8/8.12.8) with ESMTP id i0N8aDHj016859; Fri, 23 Jan 2004 09:36:14 +0100 Original-To: Marius Vollmer In-Reply-To: <8765f34fz3.fsf@zagadka.ping.de> X-Mailer: Ximian Evolution 1.4.5 X-Virus-Scanned: By http://levonline.com - free virus scanning for all customers X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:1128 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:1128 Whoops, I must have been tired when I wrote that line (OK, it was late) I didn't notice that scm_num_eq returned SCM, and yes,you were right, it did always return true, not false as I had claimed. Thanks! Best regards Roland On Fri, 2004-01-23 at 02:21, Marius Vollmer wrote: > Roland Orre writes: > > > Hi, > > This code gives the expected result: > > if (SCM_EQ_P(SCM_CDR(handle),SCM_MAKINUM(0))) > > > > but this code doesn't: > > if (scm_num_eq_p(SCM_CDR(handle),SCM_MAKINUM(0))) > > > > as this latter code always gives false back. > > Hmm, it should always be true: scm_num_eq returns either SCM_BOOL_F or > SCM_BOOL_T which are both true in the eyes of C. Try this: > > if (!SCM_NFALSEP (scm_num_eq_p(SCM_CDR(handle),SCM_MAKINUM(0)))) > > (Why don't we have SCM_TRUEP?) _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile