In SRFI-48,
Examples
...
(format #f "~a ~? ~a ~%" 3 " ~s ~s " '(2 2) 3)
; =>
"3 2 2 3
"
(format "~w" (let ( (c '(a b c)) ) (set-cdr! (cddr c) c) c))
; => "#1=(a b c . #1#)"
(format "~8,2F" 32)
; => " 32.00"
(format "~8,3F" (sqrt -3.8))
; => "0.000+1.949i"
(format "~8,2F" 3.4567e11)
; => " 3.45e11" ----> Why not " 3.46e11"?
(format "~6,3F" 1/3)
; => " 0.333"
--
INITERM