06.03.2014 Views

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8 <strong>Intel</strong> <strong>Fortran</strong> <strong>Language</strong> <strong>Reference</strong><br />

A procedure must not have more than one explicit interface in a given scoping unit.<br />

A interface block containing generic-spec specifies a generic interface for the following<br />

procedures:<br />

• The procedures within the interface block<br />

Any generic name, defined operator, or equals symbol that appears is a generic identifier for<br />

all the procedures in the interface block. For the rules on how any two procedures with the<br />

same generic identifier must differ, see “Unambiguous Generic Procedure <strong>Reference</strong>s”.<br />

• The module procedures listed in the MODULE PROCEDURE statement<br />

The module procedures must be accessible by a USE statement.<br />

To make an interface block available to multiple program units (through a USE statement), place<br />

the interface block in a module.<br />

The following rules apply to interface blocks containing pure procedures:<br />

• The interface specification of a pure procedure must declare the INTENT of all dummy<br />

arguments except pointer and procedure arguments.<br />

• A procedure that is declared pure in its definition can also be declared pure in an interface<br />

block. However, if it is not declared pure in its definition, it must not be declared pure in an<br />

interface block.<br />

Examples<br />

The following example shows a simple procedure interface block with no generic specification:<br />

SUBROUTINE SUB_B (B, FB)<br />

REAL B<br />

...<br />

INTERFACE<br />

FUNCTION FB (GN)<br />

REAL FB, GN<br />

END FUNCTION<br />

END INTERFACE<br />

See Also<br />

• “Functions”<br />

• “Subroutines”<br />

• “Use and Host Association”<br />

• “Modules and Module Procedures”<br />

• “Pure Procedures”<br />

• “Determining When Procedures Require Explicit Interfaces”<br />

8-48

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!