[J3] USE association of namelist groups?
Van Snyder
van.snyder at jpl.nasa.gov
Sat Nov 24 13:35:01 EST 2018
On Sat, 2018-11-24 at 10:10 -0800, Steven G. Kargl via J3 wrote:
> On Sat, Nov 24, 2018 at 04:31:37PM +0900, Malcolm Cohen via J3 wrote:
> >
> > >Well, it seems to me that C8102 prohibits access to a name of
> > >a namelist-group-name by use association.
> >
> > And yet literally no one else thinks this is true. Because it is NOT TRUE.
> > It only prohibits use of a namelist-group-name by use association IN THAT
> > BNF RULE. Which happens to be the NAMELIST statement.
> >
>
> Apparently the person who wrote gfortran's support for
> NAMELIST has interpreted the constraint in the Fortran
> 95 final committee draft (X3J3/96-007, page 66, line 8)
> the same way as I have explained. That support was
> written 13 years ago, and only today has a bug report
> surface. So, you're use of "literally, no one else"
> seems somewhat condescending.
>
> But, I have the information I need. c8102 is sufficiently
> poorly worded that someone may misintrepret its meaning
> and thus someone might write a buggy Fortran processor.
The purpose of C8103 is to prevent this:
module M1
real :: A, B
namelist /foo/ A
namelist /foo/ B
end module M1
module M2
use M1
real :: X
namelist /foo/ X
end module M2
A NAMELIST can be constructed by several statements because of the
statement-length restrictions.
The NAMELIST statement in M2 would extend the namelist group. While
technically feasible, it's prohibited because it would be a mess for
implementors.
More information about the J3
mailing list