home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource
/
14_3.tcl
< prev
next >
Wrap
Text File
|
2003-04-16
|
269b
|
19 lines
#
# Example 14-3
# Nested namespaces.
#
namespace eval foo {
variable x 1 ;# ::foo::x
}
namespace eval bar {
variable x 2 ;# ::bar::x
namespace eval foo {
variable x 3 ;# ::bar::foo::x
}
puts $foo::x ;# prints 3
}
puts $foo::x ;# prints 1