Posted to tcl by emiliano at Tue Aug 04 20:55:16 GMT 2009view raw

  1. % namespace eval a {variable avar}
  2. % proc a::b {} {variable avar; puts [namespace which -variable avar]}
  3. % a::b
  4. ::a::avar
  5. % namespace eval a {variable ary; set ary(key) value}
  6. value
  7. % proc a::c {} {variable ary; puts [namespace which -variable ary(key)]}
  8. % a::c
  9.  
  10. % proc a::d {} {variable ary; puts [namespace which -variable ary]}
  11. % a::d
  12. ::a::ary
  13. % proc a::e {} {variable ary; puts $ary(key); puts [namespace which -variable ary(key)]}
  14. % a::e
  15. value
  16.  
  17. % info patch
  18. 8.6b1.1
  19. %