From: E. Allaert Date: 02 August 1999 VLT-SW-OCT99 - Tcl/Tk 8.0 PORTING GUIDELINES ============================================ In order to check your FEB99 Tcl/Tk scripts with regard to compatibility- issues introduced by OCT99 (Tcl/Tk 8.0), please do the following: 0. Get version 1.20 or higher of compat (which is anyway be part of OCT99; so if you're running on a OCT99 installation, compat should already be there for you, no need to cmmCopy). If it is not yet under VLTROOT, install it in your INTROOT. 1. Read the edited manpage of compat 1.20. There are 2 new options: -verbose and -configFile 2. cd to your module directory of the module to be checked, and run compat, print results (or store them in a file) $ cd $ find . -name "*.tcl" | compat -verbose -configFile $INTROOT/config/compat.TclTk8.config | lp 3. Check the reported potential compatibilities within the files as listed by compat, and follow the instructions given by the verbose output. Remark: there are some "incompatibilities" which will *not* be reported by compat, as they can only be detected at runtime. They basically are list operations on strings (which are not necessarily well-formed lists), and as such should be rather classified as "poor programming style". See also the Tcl/Tk Release Notes. Three typical examples: tcl7.6> lindex {first and "the rest"; can be anything} 0 first tcl7.6> tcl8.0> lindex {first and "the rest"; can be anything} 0 Error: list element in quotes followed by ";" instead of space tcl8.0> ---------------- tcl7.6> lrange {a b c} 1 2 b c tcl7.6> # remark that the above result gives as string-length: 11 tcl8.0> lrange {a b c} 1 2 b c tcl8.0> # remark that the above result gives as string-length: 3 ---------------- tcl7.6> lrange {a b c "d"} 2 end c "d" tcl7.6> lrange {a b c "d e"} 2 end c "d e" tcl7.6> tcl8.0> lrange {a b c "d"} 2 end c d tcl8.0> lrange {a b c "d e"} 2 end c {d e} tcl8.0> If you want/need to keep your module compatible with both Tcl 7.6 and Tcl 8.0, remember there is the global Tcl-variable "tcl_version" which will tell you what version you're running. This is actually how seq, bob and dbl have been upgraded. ___oOo___