1.

What Is The Difference Between A Function Subprogram And A Subroutine?

Answer»

The biggest difference is that a subroutine never RETURNS a value that is associated with its name. This means that you never need to DECLARE a subroutine name in a type statement (REAL, INTEGER ...). All information coming back from a subroutine passes through the argument list, or SOMETHING called a COMMON block (later). However, there is nothing in these COMMUNICATIONS channels that can't be used by a Function Subprogram. A secondary difference is that a Subroutine need not have an argument list.

The biggest difference is that a subroutine never returns a value that is associated with its name. This means that you never need to declare a subroutine name in a type statement (REAL, INTEGER ...). All information coming back from a subroutine passes through the argument list, or something called a COMMON block (later). However, there is nothing in these communications channels that can't be used by a Function Subprogram. A secondary difference is that a Subroutine need not have an argument list.



Discussion

No Comment Found