[J3] Is this standard-conforming?
Malcolm Cohen
malcolm at nag-j.co.jp
Thu Jul 26 20:50:09 EDT 2018
Bill Long writes:
> I think it boils down to whether the FUNCTION statement itself is part of the scoping unit of the function.
It absolutely is, no question about it.
Vipul Parekh writes:
> The name of an entity made accessible by an IMPORT statement shall
>not appear in any of the contexts described in 16.5.1.4 that cause the
>host entity of that name to be inaccessible
And indeed, it does not appear in any of the contexts described in 16.5.1.4 that cause the host entity of that name to be inaccessible. So that rule is satisfied.
> A name that appears in the scoping unit as .. a named-constant in a
>named-constant-def in a parameter-stmt
And indeed, it does *not* appear in the scoping unit in a parameter statement; the only specification statement it appears in *In The Scoping Unit* is the IMPORT statement. Here, “the” scoping unit is the scoping unit we’re talking about (which is the interface body), and the main program is “the host” scoping unit.
Therefore the host entity c_name is accessible, no question about it.
Cheers,
--
..............Malcolm Cohen, NAG Oxford/Tokyo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20180727/4f3429c1/attachment.html>
More information about the J3
mailing list