CLIM mail archive


'~&' control sequence broken in FORMAT for Lucid CLIM streams?

Has anyone else encountered the following glitch in Lucid CLIM 1.1?
Workarounds or patches would be appreciated; responses of the form "it's
fixed in 2.0" need not apply.


Problem Description:

   The FORMAT control sequence '~&', which starts a fresh line on the
   output stream if necessary, does not seem to work for CLIM output
   streams when it is the first thing in the format control string:
   "~&...".  It works correctly when used on other output streams or when
   the control sequence is anywhere other than the start of the control
   string "...~&...".  Preceding the call to FORMAT with a call to
   FRESH-LINE on the output stream also works correctly.

   Calling the following function with a CLIM output stream should
   demonstrate the problem.  Cases 1 and 2 work correctly, but case 3
   fails, instead of producing identical output.

      (TEST-~& (str)
        (clim:formatting-table (str)
          (clim:formatting-row (str)                                   
            (clim:formatting-cell (str)
              (format str "1. "))
            (clim:formatting-cell (str)
              (format str "hello world!~&goodbye moon!")))
          (clim:formatting-row (str)                                   
            (clim:formatting-cell (str)
              (format str "2. "))
            (clim:formatting-cell (str)
              (format str "hello world!")
              (fresh-line str)
              (format str "goodbye moon!")))
          (clim:formatting-row (str)                                   
            (clim:formatting-cell (str)
              (format str "3. "))
            (clim:formatting-cell (str)
              (format str "hello world!")
              (format str "~&goodbye moon!")))))

    This test case works correctly in Symbolics CLIM 1.1 and Allegro CLIM


   Sun SPARCStation 2 (32Mb Ram), SunOS 4.1.2
   Lucid Common Lisp, Development Environment 4.0.2, 6 July 1990
   Sun-4 Version for SunOS 4.0.x and sunOS 4.1 
   CLIM 1.1


Main Index | Thread Index