Posted to tcl by aspect at Wed Feb 12 05:26:16 GMT 2020view raw
- proc ok {result} {
- tailcall return -code ok $result
- }
- proc notok {result} {
- tailcall return -code error $result
- }
- proc q {} {
- notok "I can't do that Dave"
- }
- proc z {} {
- ok "I like that, please do it again"
- }
- proc a {} {
- if {[catch {q} res]} {
- notok $res
- }
- puts "doing other stuff"
- ok "done"
- }
- a