[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: format bug



>>>>> "TK" == Tobias Kunze <tkunze@ulysses.stanford.edu> writes:

TK> The examples on page 585 of CLtL2 don't work:

 | > (format nil "~,,' ,4b" #xface)
 | "1111101011001110"
 | NIL

I'm not so sure the examples are right, note that CLtL2 does say:

  "The : modifier causes commas to be printed between groups of three digits."

and in dpANS I don't see this particular example; the similiar
examples all use the `:'.

CLISP does obey the `:':

  > (format nil "~,,' ,4:B" #xface)
  "1111 1010 1100 1110"

I think if the fourth parameter implied a `:', it would be
a nuisance if format strings were being generated by a program.