What is so special about modules which makes them
different from the following construction:
module A ! A.f90
contains
... implementations of some public
subroutines
end module A
Compiler creates
1)
module Amod ! A.mod
! yes, the module again, only with interfaces
! of those public routines. Maybe with slightly
! changed (optimized) interfaces. Probably not in fixed form,
! not in free form (why actually not?) but in some "vendor specific"
form.
end module Amod
2)
Object file Amod.o with the implementations matching the
declarations in the "compiled" module above.
One does it often manually if one, say, collects interfaces of BLAS
in a module. If that would be the way all compilers work -- I will be able
to adjust my makefile to avoid unnecessary compiles.
Alexei
|