[cells-devel] Celtk: Not really Celtk related, but .... ?! format does unwanted optimizations ...

Frank Goenninger fgoenninger at prion.de
Sun May 21 17:04:08 UTC 2006


Hi all:

I have that problem that I get some unwanted optimizations from format :

I want to do send a string to Tcl/Tk via function tk-format-now. My  
call to tk-format-now looks as follows:

   (tk-format-now "fileevent ~A readable [list readable ~A ~A]"
		 ch-name
		 ch-name
		 path))

This produces a Tcl error:

Tcl error: can not find channel named "#1=file22"
    [Condition of type SIMPLE-ERROR]

  When looking at the call stack then I see the followig:

  6: (CTK::TCL-EVAL-EX 25144328 "fileevent #1=file22 readable [list  
readable #1# .fileevent-test]")
       Locals:
         CTK::I = 25144328
         CTK::S = "fileevent #1=file22 readable [list readable  
#1# .fileevent-test]"
   7: (CTK:TK-FORMAT-NOW "fileevent ~A readable [list readable ~A  
~A]" #1="file22" #1# ".fileevent-test")
       Locals:
         CTK::FMT$ = "fileevent ~A readable [list readable ~A ~A]"
         NIL = "file22"
         NIL = "file22"
         NIL = ".fileevent-test"

Obviously Lisp optimizes the reference to the string object "file22"  
into a reference (Hmm - this is new to me. Is this real Lisp speak to  
describe the facts shown above ???).

Thx for any pointers!

Frank




More information about the cells-devel mailing list