Posted to tcl by xharx at Sat Nov 14 12:03:07 GMT 2020view raw

  1. proc getvals1 {} {
  2. global tvals1
  3. while {1} {
  4. incr tvals1
  5. update
  6. after 1000
  7. }
  8. }
  9. proc getvals2 {} {
  10. global tvals2
  11. while {1} {
  12. incr tvals2
  13. update
  14. after 1000
  15. }
  16. }
  17. set tvals1 10
  18. set tvals2 100
  19.  
  20. label .l1 -textvariable tvals1
  21. label .l2 -textvariable tvals2
  22. pack .l1
  23. pack .l2
  24. getvals1
  25. getvals2
  26.