[Openmcl-devel] Minor bug: format "~@?" and "~:*" don't work together

Gary Byers gb at clozure.com
Wed Dec 28 05:23:17 PST 2011

As far as I can tell,

? (defun foo (n) (format nil "~D ~@?" n "frob~2:*~P"))

works as expected in 1.6, 1.7, and the trunk (and quite possibly other

What exactly doesn't work for you ?

On Tue, 27 Dec 2011, Scott L. Burson wrote:

> I was printing a list of counts of things, some of which were nouns
> and therefore needed to be pluralized, others of which were adjectives
> and therefore needed not to be pluralized.  To handle this I created a
> list of format strings which I invoked from a main format string using
> "~@?".  So I wound up effectively doing something like this:
>  (format nil "~D ~@?" n "frob~2:*~P")
> which should return "1 frob" if n is 1, and "2 frobs" if n is 2 (etc.).
> This works fine in SBCL, Allegro, and LispWorks, but not CCL; CCL
> gives a "missing argument" error on the "~P".
> This is not important to me, but I thought you might want to know.
> -- Scott
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

More information about the Openmcl-devel mailing list