Wolfhard Bu� <wbuss@gmx.net> wrote:
+---------------
| Duane Rettig <duane@franz.com> writes:
| > Tim Bradshaw <tfb@cley.com> writes:
| >> * Rand Sobriquet wrote:
| >> > Format is pretty straightforward. Loop, on the other hand, is rather
| >> > opaque - I find it hard to visualize the end-result (probably a
| >> > personal problem). My mind slides over the loop body without gaining
| >> > purchase.
| >>
| >> "~& ~:[?~;~:*~S~]: ~:[?~;~:*~S~] -> ~:[?~;~:*~S~]~%"
| >
| > #<Printer Error, obj=#x71000985: Insufficient format args>
|
| (format nil "~:[~?~;~:*~S~]: ~:[~?~;~:*~S~] -> ~:[~?~;~:*~S~]" 'car 'list t)
|
| => "CAR: LIST -> T"
+---------------
Oh, but that's just the *simple* case!! ;-} ;-}
Here's a much more interesting set of arguments:
(format nil "~:[~?~;~:*~S~]: ~:[~?~;~:*~S~] -> ~:[~?~;~:*~S~]"
nil "==~s==" '(foo)
'bar
nil "~s:~{ <~S,~S>~}." '(baz (x0 y0 x1 y1)))
=> "==FOO==: BAR -> BAZ: <X0,Y0> <X1,Y1>."
[Thank heavens for the CLHS!]
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607