[Top][All Lists]

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

Re: scm_num_eq

From: Marius Vollmer
Subject: Re: scm_num_eq
Date: Fri, 23 Jan 2004 02:21:36 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Roland Orre <address@hidden> 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?)

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

reply via email to

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