|
From: | Per Bothner |
Subject: | Re: add printf.scm to ice-9? |
Date: | Mon, 08 Apr 2002 22:05:37 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9+) Gecko/20020328 |
Steve Tell wrote:
#|kawa:1|# (format "[~12,5e]" (sqrt 2)) [ 1.41421E+0]In guile, that's (format #f "[~12,5e]" (sqrt 2))
Kawa allows the #f (or more generally the "destination" specification) to be omitted. I believe this was to be compatible with some other Scheme implementations. It certainly is needed for compatibility with SRFI-28, which implies "many Scheme implementations" have a format function that does not require the #f.
I've wondered how one would translate somthing like (let ((w 12)(d 5)) (printf "%*,*e" w d (sqrt 2)))though.But how terrible would it really be to provide both format and printf?
Not terrible at all. In fact slib (and Kawa) provide both. -- --Per Bothner address@hidden http://www.bothner.com/per/
[Prev in Thread] | Current Thread | [Next in Thread] |