If you have a need to access a variable in more than one scope -
say in two different procedures, or globally as well as in a procedure,
then you want to deal with global variables.
I myself recommend the following:
set ::i 1 ;# set the global variable i
proc abc {} {
puts "Inside abc , I see that global i = $::i"
}
proc xyz {} {
puts "Inside xyz , I see that global i = $::i"
}
abc
incr $::i
xyz
--
Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ >
Larry W. Virden <mailto:[EMAIL PROTECTED]> <URL: http://www.purl.org/NET/lvirden/>
Even if explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.
-><-
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/vtcl-user