next up previous contents
Next: Explicit Interfaces for Internal Up: Procedure Interfaces Previous: More on Implicit Interfaces   Contents

Explicit Interfaces

The above examples show clearly that it is important to provide the caller with essential information about the called procedure's arguments; this information must include the types, number and order of dummy arguments.

If, in the above examples, the main program CONTAINS the function sort, all the faulty examples above will result in compilation errors. We say that internal procedures have an explicit interface with the host. This means that the host (main program) has all the information needed about the procedure's argument list.

Explicit interfaces provide the compiler with all the needed information to

In general, procedures have an explicit interface with the calling program (the calling program has complete knowledge about the procedure's argument list) in the following situations:

  1. the procedure is intrinsic to Fortran (e.g. SIN, EXP, MAX, etc.)
  2. the procedure is internal, and the calling program is its host;
  3. the procedure is internal, and a module is its host; the calling program USEs the host module;
  4. the calling program has a block interface construct (to be discussed next);
  5. a module has a block interface construct, and the calling program USEs this module.


next up previous contents
Next: Explicit Interfaces for Internal Up: Procedure Interfaces Previous: More on Implicit Interfaces   Contents
Adrian Sandu 2001-08-26