The second mechanism for passing data between routines is the return value of a
function. FORTRAN makes a distinction between subprograms that return a value
(functions) and those that do not (subroutines), whereas C does not. All C
subprograms are functions that return a value (even the main program), although
that value may be void. Since it is simply a value that is being
returned, the mechanisms for returning scalar numeric values tend to be just
that - a value is returned.
However, things get more complicated in the case of
functions returning things like character variables. This will be discussed
further in
machine dependencies.
CNF and F77 Mixed Language Programming -- FORTRAN and C