Skip to main content
added 108 characters in body
Source Link
Johannes Kuhn
  • 7.5k
  • 5
  • 32
  • 44

Tcl

proc return1 {} {
    catch {(5+2-3)/4}
}

Does not work as you might think.

(5+2-3)/4 is not a valid command, so it throws an error (return -code 1), catch returns this number.

Tcl

proc return1 {} {
    catch {(5+2-3)/4}
}

Does not work as you might think.

Tcl

proc return1 {} {
    catch {(5+2-3)/4}
}

Does not work as you might think.

(5+2-3)/4 is not a valid command, so it throws an error (return -code 1), catch returns this number.

Source Link
Johannes Kuhn
  • 7.5k
  • 5
  • 32
  • 44

Tcl

proc return1 {} {
    catch {(5+2-3)/4}
}

Does not work as you might think.