Empty Array Names

   

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Chapter 53.  Tcl/Tk 8.2


Perhaps the only change in Tcl 8.2 visible to Tcl scripts is support for empty array names. This is a quirk you can get by using name spaces or upvar, but it was previously difficult to use directly. For example, the syntax $::foo::(item) references an array. That worked in any version of Tcl that supported namespaces. However, in Tcl 8.2 you can also use $(item) directly, which implies that the array name is the empty string. This trick is exploited by Jean-Luc Fontain's STOOOP object-oriented extension.


       
    Top
     



    Practical Programming in Tcl and Tk
    Practical Programming in Tcl and Tk (4th Edition)
    ISBN: 0130385603
    EAN: 2147483647
    Year: 1999
    Pages: 478

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net