Print

Print


> >All worked as expected.  This is with the Compaq compiler on VMS.
> 
> You do not have to copy module A to where you compile B, if you just enter
> /include=[dir_of_a] on the f90 command for B. You can leave this out on
> compilation of B. As expected A.OBJ is not needed in the link.

This is true, but beside the point.  The point is that the mod file from 
A is needed when TEST is compiled, even though nothing from A 
propagates into test.  I didn't notice this at first, since the mod file 
from A was accessible when compiling test (through copying or /include 
doesn't matter).  However, if it is not present, TEST does not compile.

A is not needed to compile TEST.  Apparently most compilers want it to 
be accessible, though.  The question is, does the standard require it to 
be accessible?  My guess is that it probably does.  There are other 
examples where the standard requires stuff to be accessible even though 
we (or a smart compiler) know it is not needed.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%