Subject: Re: Formatting numbers with commas
From: Erik Naggum <erik@naggum.no>
Date: 1999/05/18
Newsgroups: comp.lang.lisp
Message-ID: <3136031860717961@naggum.no>

* barranquero@laley-actualidad.es (Juanma Barranquero)
| As I see it, the standard offers a way to print a number using the width
| it has in the specified radix (similar to C's "%d"), but no way to do a
| "%05d", for example.

  a format string of "~5,'0D" does this for me all the time.

  I don't think people expect (format <stream> "~23,'0,':,2:X" <number>) to
  produce a bunch of colon-separated pairs of leading 0's, like the
  Ethernet address formatter it could have been in an ideal world, and
  simply don't do this to begin with, which means we're not encroaching on
  people who have reasonable expectations.  so, I think Barry's suggestion
  (to treat digit pad-chars specially) is the most sensible because it
  would make it possible to use this facility in ways that are currently
  producing undesirable results.

#:Erik
-- 
@1999-07-22T00:37:33Z -- pi billion seconds since the turn of the century