7 Returning values

A subroutine can return a value using the “return” statement. This mechanism is very useful, as the result computed by a subroutine can be utilized immediately by an expression without using an intermediate variable that is required by passing by reference.

 7.1 A simple case of returning a value
 7.2 Invoke in an invoke
 7.3 Return to a return
 7.4 Returning in an actual programming language
 7.5 What if there is no “return”?