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

using format to write to a string



Seems to work for me on a 36xx [as well as in unix CL's], 
but not on an XL400.

Am I doing something wrong here?

tnx,
-f


;;****************** example *********

Command: (defun test-io-to-string-w (&aux keep-string)
	   (setf keep-string
		 (with-output-to-string (stringer)
		   (format stringer "here we see ~A happen " 'DOESNT-BLOWUP)))
	   (list 'A 'B keep-string)) 
TEST-IO-TO-STRING-W
Command: (test-io-to-string-w)
(A B "here we see DOESNT-BLOWUP happen ")

Command: (defun test-io-to-string (&aux keep-string)
	   (setf keep-string (make-array 0 :element-type 'STRING-CHAR
				  	   :fill-pointer 0 :adjustable T))
	   (format keep-string "Here we see ~A happen " 'BIG-BLOWUP)
	   keep-string)
TEST-IO-TO-STRING
Command: (test-io-to-string)

Trap: The word #<DTP-FIXNUM 14534462510> was read from location 1232731 
 (in WORKING-STORAGE-AREA).

The following specials have been rebound; use :Show Standard Value Warnings for details:
  *PRINT-ESCAPE*

CLI::STRING-OUTPUT-STREAM
   Arg 0 (CLI::ENVIRONMENT): (#<Error printing object CONS 36600551155>
   Arg 1 (CLI::OP): :STRING-OUT
   Arg 2 (CLI::ARG1): "BIG-BLOWUP"
   Rest Arg (CLI::ARGS): NIL
s-A, ^R:    Supply a value to use this time as the contents of #<DTP-LOCATIVE 1232731>
s-B, s-sh-C:   Supply a value to store permanently as the contents of #<DTP-LOCATIVE 1232731>
s-C:           Retry the %MEMORY-READ instruction
s-D, ^Q:    Return to Breakpoint ZMACS in Editor Typeout Window 1
s-E:           Editor Top Level
s-F:           Restart process Zmacs Windows