fork(1) download
  1. array set FOO {
  2. foo OK
  3. foo,bar OK
  4. }
  5.  
  6. # 1
  7. proc returnFoo {array_name} {
  8. upvar 1 $array_name array
  9. return [array get array]
  10. }
  11.  
  12. array set recFOO [returnFoo FOO]
  13. puts $recFOO(foo,bar)
  14.  
  15.  
  16. # 2
  17. proc returnFoo {} {
  18. return FOO
  19. }
  20. upvar 0 [returnFoo] BAR
  21. puts $BAR(foo)
Success #stdin #stdout 0s 15776KB
stdin
Standard input is empty
stdout
OK
OK