See Hyperspec section 22.3.2.1 (FORMAT) Tilde R: Radix. Example number three is
(format nil "~19,0,' ,4:B" 3333) => "0000 1101 0000 0101"
That is, 19 binary colums padded with zeros and spaces between every
four columns should give a 16 bit value with three spaces. Now if I
try this in CMUCL 19a:
* (format nil "~19,0,' ,4:B" 3333)
Type-error in KERNEL::OBJECT-NOT-BASE-CHAR-ERROR-HANDLER:
0 is not of type BASE-CHAR
[Condition of type TYPE-ERROR]
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(LISP::STRING-OUCH #<String-Output Stream> 0)
Which is obviously not what I expected, given the hyperspec. It's
upset because the zero isn't quoted as a character, which I suppose is
right given other parts of the FORMAT description, so the Hyperspec
example is wrong there. If I quote the zero so that it stops whining
about the BASE-CHAR problem then I get a different bug:
* (format nil "~19,'0,' ,4:B" 3333)
"000001101 0000 0101"
That's not quite right since there's only two of the three spaces. So,
is there a bug in the Hyperspec? Or in CMUCL? Both? Or is it all in my
head?
Thanks
'james