unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Roland Orre <roland.orre@neurologic.se>
Cc: bug-guile@gnu.org
Subject: Re: scm_num_eq
Date: Fri, 23 Jan 2004 09:35:39 +0100	[thread overview]
Message-ID: <1074846939.23547.747.camel@localhost> (raw)
In-Reply-To: <8765f34fz3.fsf@zagadka.ping.de>

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 <roland.orre@neurologic.se> 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


      reply	other threads:[~2004-01-23  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-23  0:55 scm_num_eq Roland Orre
2004-01-23  1:21 ` scm_num_eq Marius Vollmer
2004-01-23  8:35   ` Roland Orre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1074846939.23547.747.camel@localhost \
    --to=roland.orre@neurologic.se \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).