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

format directive ~? broken with XP?

I think I reported this before but the message may not have gone

Use of the ~? directive in combination with pretty printing directives
seems to break CLISP.  I load xp-code.lisp and go into the xp package.

--begin script--
> (format nil "~<HEIGH ~s~:>" '(ho))
"HEIGH HO"                ; correct
> (format nil "~?" "~<HEIGH ~s~:>" '((ho)))
"HEIGH (HO)"              ; incorrect (old format behavior)
> (format nil "~<hi ~:@_ ho ~:>" nil)
 ho "                     ; correct
> (format nil "~?" "~<hi ~:@_ ho ~:>" '(nil))
*** - Non-existent directive
Current point in control string:
  ~<hi ~:@_ ho ~:>
1. Break> 
--end script--

The first line is correct.  The second line gives the wrong output.
(It gives the same output as if I used the non-xp format.)  The third
line is correct.  The fourth line gives an error and it should not.

Apparently the recursive call to format does not know that it has been

Am I doing something wrong?


Benjamin Shults                 Email:  bshults@math.utexas.edu
Department of Mathematics       Phone:  (512) 471-7711 ext. 208
University of Texas at Austin   WWW:    http://www.ma.utexas.edu/users/bshults
Austin, TX  78712   USA         FAX:    (512) 471-9038 (attn: Benjamin Shults)