Posted to tcl by Maximus at Thu Nov 07 21:06:21 GMT 2019view raw

  1. proc foo {} {
  2.  
  3. variable bar
  4. set bar "baz"
  5.  
  6. }
  7.  
  8. foo
  9.  
  10. variable bar
  11. puts "1: $bar"
  12.  
  13. namespace eval one {
  14. proc two {} {
  15. puts "$bar"
  16. }
  17. }
  18.  
  19. one::two