Previous section   Next section

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

Table of Contents
Chapter 53.  Tcl/Tk 8.2

Empty Array Names

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.

      Previous section   Next section