O'Reilly logo

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

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required