unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: hanwen@lilypond.org
Subject: Re: ice-9 format doesn't typecheck
Date: Fri, 08 Sep 2006 07:13:37 +1000	[thread overview]
Message-ID: <87r6yn5qim.fsf@zip.com.au> (raw)
In-Reply-To: 87zmjxkhjv.fsf@zip.com.au

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

hanwen@byrd.xs4all.nl (Han-Wen Nienhuys) writes:
>
> guile> (format #f "~$" "02.4738")
> "24.74"

I found the bug, a one line fix in the stripping of leading zeros.  It
now gives "2.4738".



[-- Attachment #2: format.scm.leading-zeros.diff --]
[-- Type: text/plain, Size: 599 bytes --]

--- format.scm.~1.25.4.1.~	2006-02-21 09:15:27.000000000 +1100
+++ format.scm	2006-09-07 17:58:49.000000000 +1000
@@ -1461,8 +1461,8 @@
 				(if (> format:fn-dot left-zeros) 
 				    (begin		; norm 0{0}nn.mm to nn.mm
 				      (format:fn-shiftleft left-zeros)
-				      (set! left-zeros 0)
-				      (set! format:fn-dot (- format:fn-dot left-zeros)))
+				      (set! format:fn-dot (- format:fn-dot left-zeros))
+				      (set! left-zeros 0))
 				    (begin		; normalize 0{0}.nnn to .nnn
 				      (format:fn-shiftleft format:fn-dot)
 				      (set! left-zeros (- left-zeros format:fn-dot))

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

      reply	other threads:[~2006-09-07 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-08  9:08 ice-9 format doesn't typecheck Han-Wen Nienhuys
2006-03-10 23:26 ` Kevin Ryde
2006-09-07 21:13   ` Kevin Ryde [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=87r6yn5qim.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=hanwen@lilypond.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).