FORTRAN Questions and Answers

Explain what is the difference between a Subroutine and function Subprogram?

• The main difference is a subroutine never returns a value that is associated with its name. Which means that you never have to state a subroutine name in a type statement (Real, Integer…). All the information coming back from a subroutine passes through the argument list.

• Another difference is that a sub-routine need not have an argument list