4 ms·
Leaving aside any quick benefits in code size or run time, named return values might make code more readable. Fortran functions have always (since Fortran II a
by pklausler 9y ago
Leaving aside any quick benefits in code size or run time, named return values might make code more readable.
Fortran functions have always (since Fortran II anyway) used named result values; so did Pascal. Since you can now pick the name of the result value variable in Fortran, I find it a useful convention to just always put RESULT(RESULT) on my functions.