unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <INVALID.NOREPLY@gnu.org>
To: Andy Wingo <wingo@pobox.com>,
	"Joel J. Adamson" <adamsonj@email.unc.edu>,
	bug-guile@gnu.org
Subject: [bug #31893] ice-9 format produces control characters and non-printable characters for numeric output
Date: Sun, 19 Dec 2010 12:14:35 +0000	[thread overview]
Message-ID: <20101219-121435.sv20118.81757@savannah.gnu.org> (raw)
In-Reply-To: <20101219-115143.sv20118.32047@savannah.gnu.org>


Update of bug #31893 (project guile):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

Actually I think this problem is less exciting. Your format was:

~9,8,,,0g

So you are specifying a width of 9 chars, 8 mantissa digits, and an "overflow
character" of zero, which also has the effect of making the width a hard
limit. Also note that your overflow char is (integer->char 0), not #  -- the
nul byte, indeed a control character.

In this case the width of the whole thing will always be more than 9
characters, so we always splat in the overflow char, which is #nul -- leading
to the result given in my first comment.

In the future for debugging these things, don't print to the terminal --
print to a string instead. That will be clearer.

Cheers,

Andy

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31893>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




  reply	other threads:[~2010-12-19 12:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 20:58 [bug #31893] ice-9 format produces control characters and non-printable characters for numeric output Joel J. Adamson
2010-12-19 11:51 ` Andy Wingo
2010-12-19 12:14   ` Andy Wingo [this message]
2010-12-20  2:55     ` Joel J. Adamson
2010-12-20 17:26       ` Andy Wingo
2010-12-21  2:36         ` Joel J. Adamson

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=20101219-121435.sv20118.81757@savannah.gnu.org \
    --to=invalid.noreply@gnu.org \
    --cc=adamsonj@email.unc.edu \
    --cc=bug-guile@gnu.org \
    --cc=wingo@pobox.com \
    /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).