From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.bugs Subject: Re: number->string of float with radix Date: 18 Oct 2002 23:53:09 +0200 Sender: bug-guile-admin@gnu.org Message-ID: <87vg3z1kje.fsf@zagadka.ping.de> References: <200210141055.DAA10691@cmn14.stanford.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034977942 21896 80.91.224.249 (18 Oct 2002 21:52:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2002 21:52:22 +0000 (UTC) Cc: bug-guile@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 182f2b-0005h1-00 for ; Fri, 18 Oct 2002 23:52:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 182f3L-0006Ff-00; Fri, 18 Oct 2002 17:53:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 182f3D-0006DQ-00 for bug-guile@gnu.org; Fri, 18 Oct 2002 17:52:59 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 182f3B-0006D1-00 for bug-guile@gnu.org; Fri, 18 Oct 2002 17:52:58 -0400 Original-Received: from mail.dokom.net ([195.253.8.218]) by monty-python.gnu.org with esmtp (Exim 4.10) id 182f3A-0006Cp-00 for bug-guile@gnu.org; Fri, 18 Oct 2002 17:52:57 -0400 Original-Received: from dialin.speedway43.dip26.dokom.de ([195.138.43.26] helo=zagadka.ping.de ident=qmailr) by mail.dokom.net with smtp (Exim 3.32 #2) id 182f3g-00007U-00 for bug-guile@gnu.org; Fri, 18 Oct 2002 23:53:28 +0200 Original-Received: (qmail 12701 invoked by uid 1000); 18 Oct 2002 21:53:09 -0000 Original-To: Bill Schottstaedt In-Reply-To: <200210141055.DAA10691@cmn14.stanford.edu> Original-Lines: 35 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: bug-guile-admin@gnu.org X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.bugs:524 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:524 Bill Schottstaedt writes: > standard input:1:1: Wrong type argument in position 2 (expecting INUMP): 2.0 > > "INUMP" is internal jargon -- "integer" or "exact integer" would be better. Yes, I agree. Our error messages suck generally, I'd say. If you want to work on this, I'd say we should define a new macro #define SCM_MAKE_VALIDATE2(pos, val, test, msg) \ do { \ SCM_ASSERT_TYPE (test, val, pos, FUNC_NAME, msg); \ } while (0) and then incrementally replace uses of SCM_MAKE_VALIDATE with improved versions. Or use SCM_ASSERT_TYPE directly. Hmm. > Also, I wonder about these kinds of calls: > > guile> (number->string 10.5 2) > "10.5" > > It's actually not senseless to have base-2 float notation ("1010.1", > "a.8" hex), but if Guile just returns base 10, maybe it should warn > the caller? Otherwise, for example, string->number does not invert > number->string: > > guile> (string->number "10.5" 2) > #f Yes. We are in clear violation of R5RS here. I'll record a bug for this in the workbook. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile