Name

return — Returns a value from a procedure.

Synopsis

return value

Description

The return command returns a value from a proc command.

Example

proc someproc {} {
    set res 1
    return $res
    set res 2
    return $res
}
puts [someproc]
	  

Produces:

1