# 6.1 Subprogram Arguments

Subprogram arguments are either dummy arguments or actual arguments, and are specified as follows:

- Dummy arguments are specified when you write the subprogram.

- Actual arguments are specified when you invoke the subprogram.

When control is transferred to a subprogram, each dummy argument takes the value of the corresponding actual argument. When control is returned to the calling program unit, the last value assigned to a dummy argument is assigned to the corresponding actual argument.

Note
  Parentheses can be used in argument lists to force a given scalar-reference argument to be treated as an expression, rather than as the address of a memory item. This usage can suppress errors if the subprogram writes to a formal argument, but the caller wants to pass a constant value.

Section 6.1.1 describes the general techniques used to pass arguments between Fortran programs. Section 6.1.2 describes how to use Fortran built-in functions to pass arguments from within Fortran subprograms to subprograms written in other languages.

Previous Page Next Page Table of Contents