P Suckling writes:
> Could someone please confirm if the following is allowed or not?
>
> USE some_module, ONLY :: a, b=>a
>
> so that b and a are both names for the same thing. It seems to work okay with
> the Compaq compiler... but it's the kind of thing that sometimes is not actually
> allowed and I don't want to have problems at a later date.
It is allowed. Mostly because there is no prohibition against it.
Sometimes it is hard to cite the exact place where the standard
*DOESN'T* say something, but in this case we are lucky in that
the standard does have a note pointing out the lack of such a
restriction.
Note 11.7 of f95:
"There is no prohinition against a <use-name> appearing multiple
times in one USE statement or in multiple USE statements involving
the same module. As a result, it is possible for one
use-associated entity to be accessible by more than one local name."
That seems to answer your question pretty directly. (Obviously,
other people once asked the same thing).
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|