| United States-English |
|
|
|
![]() |
HP Fortran Compiler for HP-UX: HP Fortran Programmer's Reference > Chapter 10 HP
Fortran statementsCONTAINS |
|
Introduces an internal procedure or a module procedure. Syntax
DescriptionThe CONTAINS statement introduces an internal procedure or a module procedure, separating it from the program unit that contains it. The statement can be used in:
When a CONTAINS statement is present, at least one subprogram must follow it. ExamplesThe first example illustrates CONTAINS introducing an internal subroutine. It also illustrates how the internal subroutine mechanism can provide an alternative to the FORTRAN 77 statement function mechanism.
The next example illustrates a main program with an internal procedure part.
The third example is of a module that contains a module subprogram, which in turn contains an internal subprogram.
Related statementsSUBROUTINE and FUNCTION Related conceptsFor related information, see the following: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||