|
From: | Per Bothner |
Subject: | Re: format equivalent of printf "%3.1f", "%03x" |
Date: | Mon, 15 Oct 2001 22:17:54 -0700 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4+) Gecko/20010918 |
Steve Tell wrote:
Alternately, has anyone ever implemented a printf procedure for guile (or failing that, any scheme, I suppose) that is a full-featured superset of C's printf?
Kawa has a fairly complete implementation of the Common Lisp format routine.For example: (format "~4,1f" 1.267) => " 1.3". It should be easy enough to also
support the C printf style, as also used by Emacs.SLib does have a printf implementation, though at least under Kawa it generates the wrong output for your example. (This could be a bug in Kawa, though.) At some I'll get around to ditching the slib version in favor of one using the same code as
the Lisp-style format.
[Prev in Thread] | Current Thread | [Next in Thread] |