PROCEDURE statements
Standard: F77 F90 F95 F2003
<Syntax>
There are four statements that can begin with the PROCEDURE keyword.
The procedure declaration statement has the syntax:
PROCEDURE ( [ proc-interface ] ) , proc-attr-list :: proc-decl-list
proc-interface::=interface-name
 | declaration-type-spec
proc-attr::=INTENT ( intent-spec )
 | OPTIONAL
 | POINTER
 | PRIVATE
 | PUBLIC
 | SAVE
proc-decl::=proc-name [ => NULL() ]

The procedure component definition statement has the syntax:
PROCEDURE ( [ proc-interface ] ) , proc-component-attr-list :: proc-component-decl-list
proc-component-attr::=NOPASS
 | PASS [ ( arg-name ) ]
 | POINTER
 | PRIVATE
 | PUBLIC
proc-component-decl::=proc-component-name [ => NULL() ]

The type-bound procedure statement has the syntax:
PROCEDURE ( [ interface-name ] ) , binding-attr-list :: tbp-name [ => procedure-name ]
binding-attr::=DEFERRED
 | NON_OVERRIDABLE
 | NOPASS
 | PASS [ ( arg-name ) ]
 | POINTER
 | PRIVATE
 | PUBLIC

The procedure statement in a generic interface block has the syntax:
[ MODULE ] PROCEDURE [ :: ] procedure-name [ , procedure-name ]...

If the keyword MODULE appears, each procedure-name must be the name of a module procedure; otherwise, each procedure-name must be the name of a module procedure, external procedure, dummy procedure or procedure pointer. In all cases, procedure-name must have an explicit interface.

The MODULE PROCEDURE version of this statement was also present in Fortran 90 and 95.
<Semantics>
The procedure declaration statement declares an external procedure, a dummy procedure, or a procedure pointer. A procedure declared by this statement is a procedure pointer if it has the POINTER attribute (which may be specified separately), a dummy procedure if it is a dummy argument, and an external procedure only if it is not a dummy argument and does not have the POINTER attribute. A dummy procedure with the POINTER attribute is a dummy procedure pointer.

The procedure component definition statement defines a procedure pointer component, also known as an object-bound procedure. See the related link for the full syntax and semantics.

The type-bound procedure statement defines a type-bound procedure. See the related link for the full syntax and semantics.

The procedure statement in a generic interface block adds the listed procedures to the generic interface.
<Related>
Derived Type Definition, MODULE PROCEDURE statement, Object-bound procedure, POINTER attribute, PRIVATE attribute, PUBLIC attribute, Type-bound procedure