Posted to tcl by aspect at Thu Nov 07 22:00:00 GMT 2019view raw
- namespace eval foo {
- variable bar Foobar
- }
- namespace eval bar {
- variable bar Barbar
- proc foo {} {
- variable ::foo::bar
- puts bar=$bar
- }
- proc bar {} {
- variable bar
- puts bar=$bar
- }
- proc global {} {
- variable ::bar
- puts bar=$bar
- }
- }
- set bar Global
- bar::foo
- bar::bar
- bar::global