Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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