Path: utzoo!utgpu!tmsoft!dptcdc!dpmizar!swrinde!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!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 Keywords: DO loops; transfer of control Message-ID: <3677@s.cc.purdue.edu> Date: 9 Dec 88 22:40:28 GMT References: <22994@sgi.SGI.COM> <467@ur-cc.UUCP> Reply-To: ags@s.cc.purdue.edu (Dave Seaman) Organization: Purdue University Lines: 33 In article <467@ur-cc.UUCP> rbr4@uhura.cc.rochester.edu (Roland Roberts) writes: >In article <22994@sgi.SGI.COM> bron@bronze.SGI.COM (Bron Campbell Nelson) writes: >[problem (deleted): > multiple do loops terminated by single statement > statement in outer loop (conditionally) branches to loop termination] >I've used this construct before, so I was rather surprised by this claim. [i.e. the claim that the construct is illegal] >To test it, I've just typed in this code and our VAX/VMS compiler didn't >complain in the slightest. That does not prove that the code is legal ANSI Fortran. It doesn't even prove that it's legal VAX/VMS Fortran. It only means that you selected a bad test. The correct test to determine whether it is legal ANSI Fortran is to look it up in the ANSI standard, which I already did and posted my findings in a previous message. It is not legal. The correct test to determine whether it is legal VAX/VMS Fortran is to look in the VAX/VMS Fortran manual. Since I don't have one available, I can't answer that one for you except to point out that the fact that "the compiler didn't complain" proves nothing. It may be legal, but only if it specifically says so in the DEC manual. This would then be considered an "extension," which means it is not necessarily portable to other Fortran environments. Compilers are not required to reject all incorrect programs. They are merely required to accept correct programs. Therefore, feeding a dubious Fortran construct to a compiler to see whether it complains is a completely useless exercise. -- Dave Seaman ags@j.cc.purdue.edu