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 <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile