Goeran Klose writes:
> I have a very general question. Assumed module A uses
> module B and module B uses C. Does module A have any
> direct access to data types of module C ?
> Regarding this problem, is there anything defined in the
> F90 standard ?
I'm not sure what you mean by "direct" here. I'd by construction
call this indirect access. I'm just going to ignore the word
"direct" here because it has no bearing on anything - there are
no contexts in which anything depends on whether or not the access
is direct.
First, the easy answer. Yes, this is all defined in the standard.
For the rest, it depends on the accessibility (PUBLIC or PRIVATE)
specifications in the modules, and on any ONLY clauses in the
pertinent USE statements. In the simplest case, where you haven't
said anything about PUBLIC, PRIVATE, or ONLY, then the answer is
yes - module A has access to everything from C. That is because
the default for accessibility is PUBLIC, and the default for a USE
statement is to use everything that is public.
YOu can restrict accessibility by using a PRIVATE statement, and
you can access a subset of the available PUBLIC names by using
the ONLY clause of USE. Thus, if those features are used, the
answer is "it depends". I don't think I'll try to describe all
the rules and fine points here.
--
Richard Maine | Good judgement comes from experience;
[log in to unmask] | experience comes from bad judgement.
| -- Mark Twain
|