MODULE PROCEDURE (Fortran 2008)
Purpose
A MODULE PROCEDURE statement is the first statement of a separate module subprogram.
Syntax
Rules
The procedure_name must be declared to be a separate module procedure in the containing program unit, the ancestor module, or an ancestor submodule.
Examples
The following example shows how a MODULE PROCEDURE statement is used as
the first statement of a separate module subprogram.
MODULE m
INTERFACE
MODULE SUBROUTINE sub(arg)
INTEGER :: arg
END SUBROUTINE
END INTERFACE
END MODULE
SUBMODULE (m) n
CONTAINS
MODULE PROCEDURE sub ! MODULE PROCEDURE statement
arg = 1
END PROCEDURE
END SUBMODULE