[plt-scheme] How to format numbers for easy reading?
On 5/10/07, Grant Rettke <grettke at acm.org> wrote:
> Is there a way to easily display numbers like 1000000 as 1,000,000 for example?
Welcome to DrScheme, version 369.100-svn8may2007 [3m].
Language: Graphical (MrEd, includes MzScheme).
> (require (lib "54.ss" "srfi"))
> (cat 1000000 0 '(#\,))
"1,000,000"
>
You might also want to give SRFI-53 a look; unfortunately, both do
good things for human-readable format but neither does everything the
other does.
-jacob