インテル® Fortran コンパイラー XE 13.1 ユーザー・リファレンス・ガイド
Statement: Declares procedure pointers, dummy procedures, and external procedures.
PROCEDURE ([proc-interface]) [[, proc-attr-spec]... :: ] proc-decl-list
A PROCEDURE statement is allowed only in an interface block that has a generic name.
You cannot use the PROCEDURE statement to identify a BLOCK DATA subprogram.
If => null-init appears, it specifies that the initial association status of the corresponding procedure entity is disassociated. It also implies the SAVE attribute.
You can also declare procedures by using an EXTERNAL statement or a procedure component definition statement.
Consider the following:
PROCEDURE (NAME_TEMP) :: NAME37
The above declares NAME37 to be a procedure with an identical interface to that of NAME_TEMP.
The following are equivalent:
PROCEDURE (INTEGER) X
INTEGER, EXTERNAL :: X
Consider the following:
ABSTRACT INTERFACE
FUNCTION SIM_FUNC (X)
REAL, INTENT (IN) :: X
REAL :: SIM_FUNC
END FUNCTION SIM_FUNC
END INTERFACE
INTERFACE
SUBROUTINE SUB2 (X)
REAL, INTENT (IN) :: X
END SUBROUTINE SUB2
END INTERFACE
The following shows external and dummy procedures with explicit interfaces:
PROCEDURE (SIM_FUNC) :: VMAC, KAPPA
PROCEDURE (SUB2) :: PRINGLES
The following shows procedure pointers with an explicit interface, one initialized to NULL():
PROCEDURE (SIM_FUNC), POINTER :: P1, R1 => NULL()
PROCEDURE (SIM_FUNC), POINTER :: KAPPA_POINTER
The following shows a derived type with a procedure pointer component:
TYPE MEMO_TYPE
PROCEDURE (SIM_FUNC), POINTER :: COMPONENT
END TYPE MEMO_TYPE
The following shows a variable of the above type:
TYPE (MEMO_TYPE) :: STRUCTA
The following shows an external or dummy function with an implicit interface:
PROCEDURE (INTEGER) :: PHIL0