Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

INTERFACE TO

Statement: Identifies a subprogram and its actual arguments before it is referenced or called.

INTERFACE TO subprogram-stmt

   [formal-declarations]

END

subprogram-stmt

Is a function or subroutine declaration statement.

formal-declarations

(Optional) Are type declaration statements (including optional attributes) for the arguments.

The INTERFACE TO block defines an explicit interface, but it contains specifications for only the procedure declared in the INTERFACE TO statement. The explicit interface is defined only in the program unit that contains the INTERFACE TO statement.

The recommended method for defining explicit interfaces is to use an INTERFACE block.

Example

Consider that a C function that has the following prototype:

extern void Foo (int i);

The following INTERFACE TO block declares the Fortran call to this function:

INTERFACE TO SUBROUTINE Foo [C.ALIAS: '_Foo'] (I)
  INTEGER*4 I
END

See Also