![]() |
sponsored links |
|
|
sponsored links
|
|
|
2
26th February 00:49
External User
Posts: 1
|
[upvar #0] is sooooo Tcl 7.
![]() You want to learn the [variable] command. -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |_________________________________________________ _____________________| |
|
|
3
28th February 07:47
External User
Posts: 1
|
Everywhere there is a "global" in Cameron's example, replace it with
"variable". The resulting script will work exactly the same. It will also have the advantage that when you later need to encapsulate your work in a namespace, you will just place the whole thing inside a [namespace eval] and be done. IMHO, [global] should be considered a compatibility interface kept around only to deal with code written for Tcl 7. New programmers should learn the modern commands. -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |_________________________________________________ _____________________| |
|
|
4
28th February 07:47
External User
Posts: 1
|
claird@lairds.com (Cameron Laird) writes:
OK, would someone enlighten me? I still use [global], and maybe my reason is bad too (I am sooo stuck in Tcl 7...) My main use is for the -textvariable etc of Tk widgets, and I usually group the variables for a page (toplevel) into a single array. Donald Arseneau asnd@triumf.ca |
|