Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-3EAEBC19-1F72-43F3-A7D6-0EC3F5B1E82B
Visible to Intel only — GUID: GUID-3EAEBC19-1F72-43F3-A7D6-0EC3F5B1E82B
CONTAINS
Statement: Separates the body of a main program, module, submodule, or external subprogram from any internal or module procedures it may contain, or it introduces the type-bound procedure part of a derived-type definition. It is not executable.
CONTAINS
Any number of internal procedures can follow a CONTAINS statement, but a CONTAINS statement cannot appear in the internal procedures themselves.
An empty CONTAINS section is allowed.
Example
PROGRAM OUTER REAL, DIMENSION(10) :: A . . . CALL INNER (A) CONTAINS SUBROUTINE INNER (B) REAL, DIMENSION(10) :: B . . . END SUBROUTINE INNER END PROGRAM OUTER