Fortran Wiki
Self-defining INTERFACE

Proposal: A Procedure should be able to read it’s own interface specification in and INTERFACE block.

Rationale: Fortran is designed to provide interfaces either via MODULEs or INTERFACE explicit specifications. The INTERFACE method is essential for programming without using modules. Unfortunately, the INTERFACE method is not very effective if procedures cannot read their own interface, both to allow a common include-file and to verify that the INTERFACE matches.

  • Intel Fortran already allows this as an extension. There is really no good reason not to support this, except that the INTERFACE method has not been designed very well, because the main focus has been in using modules.

  • This is still excluded in Fortran 2008: (R1201) An interface-block in a subprogram shall not contain an interface-body for a procedure defined by that subprogram.