Path: utzoo!attcan!uunet!husc6!bloom-beacon!bu-cs!purdue!i.cc.purdue.edu!h.cc.purdue.edu!s.cc.purdue.edu!ags From: ags@s.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.fortran Subject: Re: Dubious Fortran Construct Summary: Standard is perfectly clear Message-ID: <3680@s.cc.purdue.edu> Date: 12 Dec 88 20:17:16 GMT References: <22994@sgi.SGI.COM> <44400031@hcx2> Reply-To: ags@s.cc.purdue.edu (Dave Seaman) Organization: Purdue University Lines: 43 In article <44400031@hcx2> bill@hcx2.SSD.HARRIS.COM writes: > >The X3J3 FORTRAN committee has considered this question, and an >official interpretation will be published sometime in the near future, I was surprised to see this, because I see nothing ambiguous in the standard. It may be that the committee did not specifically intend to make the construct illegal, but the words they used are quite clear and explicit. Here are the relevant statements: 11.10.1 _Range_of_a_DO-Loop_. The _range_of_a_DO-Loop_ consists of all of the executable statements that appear following the DO statement that specifies the DO-Loop, up to and including the terminal statement of the DO-loop. If a DO statement appears within the range of a DO-loop, the range of the DO-loop specified by that DO statement must be contained entirely within the range of the outer DO-loop. More than one DO-loop may have the same terminal statement. This means that the CONTINUE statement in the example is part of the range of both loops. The GOTO statement in the example is not part of the range of the inner DO-loop. To complete the analysis, only one more fact is needed: 11.10.8 _Transfer_into_the_Range_of_a_DO-Loop_. Transfer of control into the range of a DO-loop from outside the range is not permitted. I did not leave anything out. What you just read is the entirety of what the standard says about transferring into the range of a DO-loop. I don't see how anything could possibly be clearer than that. If the Supreme Court can rule that the First Amendment does not mean what it says, then I suppose there is nothing to stop the X3J3 committee from ruling that the standard does not mean what it says. That is the only way I can make sense of the claim that an "official interpretation" is needed. But if the committee decides that the construct is illegal, then exactly how could they go about rewording the standard to make it any clearer than it is now? -- Dave Seaman ags@j.cc.purdue.edu