Posted to tcl by kostix at Wed Aug 15 22:58:11 GMT 2007view raw

  1. % proc mybreak {} { uplevel 1 return -code break }
  2.  
  3. % proc foo {} {
  4. set i 0
  5. while true {
  6. incr i
  7. if {$i == 10} {
  8. mybreak
  9. }
  10. }
  11. puts "must not reach here"
  12. }
  13.  
  14. % foo
  15. must not reach here