[racket-dev] Preserving trailing zeros in formatting numbers as strings

From: Kathi Fisler (kfisler at cs.wpi.edu)
Date: Thu Apr 24 05:25:07 EDT 2014

I'm generating class notes in HTML via scribble.  I'm trying to include the
number 10.50 (as a price in an test case, so the trailing 0 matters).  I'm
using format to produce the strings that go into the rendered html.  When I
do this (whether with ~a or ~s), the trailing 0 is dropped, producing 10.5
in my output instead of 10.50.

What can I do to preserve trailing zeros?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20140424/5c32dca3/attachment.html>

Posted on the dev mailing list.