bug-guile
[Top][All Lists]
Advanced

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

Re: scm_num_eq


From: Roland Orre
Subject: Re: scm_num_eq
Date: Fri, 23 Jan 2004 09:35:39 +0100

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 <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?)





reply via email to

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