Is the following behaviour a bug?
* (format t "~2,0X" 9)
debugger invoked on condition of type TYPE-ERROR:
The value 0 is not of type BASE-CHAR.
* (format t "~2,0X" 255)
My reading of ANSI makes me think that the 0 digit is to be
interpreted as a padding character, not a number. However,
PARSE-DIRECTIVE in late-format.lisp always parses digits as numbers,
If I'm understanding ANSI aright, parsing the directives is more
complex than the current PARSE-DIRECTIVE, because you need to check
which digits should be converted to numbers and which to padding
characters, depending on the directive.
[ FWIW, CMUCL, Clisp and LispWorks interpret this digit as a number,
too. A superficial muck about with the different implementations
shows wildly varying behaviour if the character isn't a digit. In
particular, the space that the padding character defaults to
(according to ANSI) doesn't work in any of the above implementations,
and a variety of other characters produce very different results (it's
hard to find characters which aren't format directives!), mostly
I'm not sure this note actually contains a clue as such, since my
expectations don't seem to correspond with the behaviour of all the
implementations I tried, so any comments are more than welcome.