[racket] Formatted output of floating-point numbers?

From: Dmitry Pavlov (dpavlov at ipa.nw.ru)
Date: Thu Jan 12 13:13:54 EST 2012

Hello Grant,

> http://synthcode.com/scheme/fmt
> There is a Planet package for it right on the page.

Thanks, it seems to be just what I need.
After reading the docs, I think that
(fmt #f (pad 10 (fix 5 12.345678)))
will do the job for me.

However, I can not load the package:

> (require (planet ashinn/fmt:1:1/fmt))
expand: unbound identifier in module
raco setup: error: during making for <planet>/ashinn/fmt.plt/1/1 (fmt)
raco setup:   expand: unbound identifier in module
. .racket/planet/300/5.2/cache/ashinn/fmt.plt/1/1/fmt.ss:71:3: expand:
unbound identifier in module in: call-with-output-string

It seems to be using Scheme features that are not supported
right away. Aside from call-with-output-string, it also uses
set-car! and set-cdr!.
Any advice on how to get it working?

Best regards,


Posted on the users mailing list.