Explicit interfaces are mandatory if an EXTERNAL procedure:
This is so the compiler can figure out what information needs to be passed to the procedure, for example, the rank, type and bounds of an array whose corresponding dummy argument is an assumed-shape array, (see Section 15.2), or the types and attributes of pointers or targets.
The compiler needs to knows the names of the arguments so it can figure out the correct association when any of the optional arguments are missing.
The compiler needs to know to pass back the function result in a different form to usual.
The compiler needs to know to pass string length information to and from the procedure.
and when the reference:
Same reasons as optional case above.
Extra information is required.
Extra information is required.
Extra information is required.
Recall that a procedure cannot appear both in an INTERFACE block and in an EXTERNAL statement in the same scoping unit.
Return to corresponding overview page