MODULE example | ||||||||
! Type Definitions | ||||||||
! Global Data | ||||||||
... | ||||||||
CONTAINS | ||||||||
|
||||||||
END MODULE example |
Procedures, together with global data, are visible by use-association (i.e. are visible in the program units that USE the module). In modules, one level of nesting is allowed for contained procedures (in contradistinction to program or procedure hosts, where nesting is not allowed). The second-level routines are visible from the first-level routines, and only the first-level routines are visible from the unit that USEs the module. In F95 an indefinite number of nesting levels is allowed.