Dependent and Independent Compilation

You can independently compile units that comprise a Fortran program. These units include the following:

Prior to Fortran 90, compilation of a program unit did not require data from the compilation of another unit. Consequently, the order of compilation of units did not affect the output.

For Fortran 95 programs, this is not always the case. The addition of modules to the language introduces a compilation dependence. A module can reference other program units with the USE statement. In contrast to independent units, dependent units require data from another module that must be compiled first. Thus, the dependence introduces an order that you must follow to compile program units.

You can compile the dependent and independent units in the same source module or in separate source files. However, the dependent file must compile after the file on which it depends.