[J3] BLOCK construct change

Malcolm Cohen malcolm at nag-j.co.jp
Wed Jun 29 00:10:47 UTC 2022


Hi Robert,

 

Firstly, I note that what you are alleging would not be that F2018 prohibits an F2008 feature, but that there is an internal contradiction in F2018. That is, F2018 states categorically in normative text that apart from the listed incompatibilities, all conforming F2008 programs are conforming F2018 programs.

 

When a contradiction arises, it is a defect in the standard.

 

However, you are mistaken in your assertion that that example is not conforming. A DATA statement is an <execution-part-construct> as well, and therefore there is no problem.

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

 

From: J3 <j3-bounces at mailman.j3-fortran.org> On Behalf Of Robert Corbett via J3
Sent: Wednesday, June 29, 2022 7:12 AM
To: General J3 interest list <j3 at mailman.j3-fortran.org>
Cc: Robert Corbett <rpcorbett at att.net>
Subject: Re: [J3] BLOCK construct change

 

Here is my emended example.

----------------------------------------------------------------
        BLOCK
          REAL X
          DATA X/0.0/
        END BLOCK
      END
----------------------------------------------------------------

The program is allowed by Fortran 2008.  The program violates
syntax rule R1109 in both Fortran 2018 and the current draft
standard.  The problem is that the DATA statement is a
/declaration-construct/, but not a /specification-construct/.
Syntax rule R1109 requires a /declaration-construct/ to be

followed by a /specification-construct/, which is not the case

in this example.  Switching the order of the REAL statement

and the DATA statement would make the program consistent with

syntax rule R1109.

 

Bob Corbett

On Tuesday, June 28, 2022 at 02:43:08 PM PDT, Robert Corbett via J3 <j3 at mailman.j3-fortran.org <mailto:j3 at mailman.j3-fortran.org> > wrote: 

 

 

You are correct.  I made a bracketing error.  I thought the /specification-construct/ is required if the USE statement is present.  I still think there is a possible error, but I shall need a different example.

 

Bob Corbett





On Jun 28, 2022, at 2:18 PM, Steve Lionel via J3 <j3 at mailman.j3-fortran.org <mailto:j3 at mailman.j3-fortran.org> > wrote:

 

On 6/28/2022 4:02 PM, Robert Corbett via J3 wrote:

The program

conforms to the Fortran 2008 standard, but it violates syntax
rule R1109 of the Fortran 2018 standard and the Fortran 202X
draft standard.

I may be slow today, but I don't see how it violates the syntax rules. Can you explain? 

 

Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20220629/9ee223f6/attachment.htm>


More information about the J3 mailing list