I'm porting cltl2 code to a system that is
not fully cltl2. The code uses the cltl2 "~/user-function/"
format directive. I was wondering wether there
exists cltl1 code that implements this directive?
Thanks,
Geert-Jan
--
Geert-Jan van Opdorp
AI-Engineering
Amsterdam, The Netherlands
·····@aie.nl
In article <··················@sparc.aie.nl> ·····@sparc.aie.nl (Geert-Jan van Opdorp) writes:
>I'm porting cltl2 code to a system that is
>not fully cltl2. The code uses the cltl2 "~/user-function/"
>format directive. I was wondering wether there
>exists cltl1 code that implements this directive?
I don't think there's a way to add this feature to Common Lisp, since it
has to be built into the FORMAT function (there may be
implementation-dependent ways to extend FORMAT, but you asked for CLtL1
code that does it). You can often work around it by rewriting the call.
(format stream "~/user-function/")
is equivalent to
(user-function stream nil nil)
If it's embedded in a format string, you can break it up:
(format stream "stuff ~:/user-function/ other stuff" args)
becomes
(progn (format stream "stuff " args used by stuff)
(user-function stream t nil)
(format stream " other stuff" args used by other stuff))
It gets more complicated if the ~/user-function/ is embedded in other
constructs, such as ~{...} or ~(...).
--
Barry Margolin
BBN PlaNET Corporation, Cambridge, MA
······@bbnplanet.com
Phone (617) 873-3126 - Fax (617) 873-5124