Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. davidbessire

    return -code behavior in catch

    But you've wrapped that code in a proc. As i wrote earlier: If the script i use in a catch: ** a. is not wrapped in "proc" ; and, b. ends with "return" Then: catch considers this an error (i.e. not TCL_OK). The point being, code like: proc runit { script } { if...
  2. davidbessire

    return -code behavior in catch

    That's how i thought it would work, too, but it doesn't (as i noted in the original post): % catch { return -code 0 } 2 % catch { return -code ok } 2 That's in Tcl 8.3 (Windows) and 8.4 (Linux). 'catch' directly receives the return code from 'return' (TCL_RETURN == 2) which is considered an...
  3. davidbessire

    return -code behavior in catch

    If the script i use in a catch: a. is not wrapped in "proc"; and, b. ends with "return" Then: catch considers this an error (i.e. not TCL_OK). This feature is documented in the Tcl/Tk man pages and in Welch. As an example of the behavior, consider: % proc bar { } { return } % catch {...

Part and Inventory Search

Back
Top