[J3] Submodule name the same as a local identifier: does that conform?
Robert Corbett
rpcorbett at att.net
Wed Apr 13 05:20:37 UTC 2022
It is conformant.
The Fortran 2018 says that the global identifier associated with a submodule is the submodule identifier, and that the submodule name itself is not a local or global identifier (14.2.3p2). Therefore, there cannot be a conflict between a local identifier and a submodule name.
Robert Corbett
> On Apr 12, 2022, at 7:18 PM, Vipul Parekh via J3 <j3 at mailman.j3-fortran.org> wrote:
>
>
> Consider the following:
>
> module m
> interface
> module subroutine sub()
> end subroutine
> end interface
> end module
> submodule(m) sub
> contains
> module subroutine sub()
> print *, "Hello World!"
> end subroutine
> end submodule
>
> where the module subroutine has the same name as the submodule name.
>
> Does this conform to the standard?
>
> Thanks,
> Vipul Parekh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20220412/b4805e8f/attachment.htm>
More information about the J3
mailing list