Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!sgi!bron@bronze.SGI.COM From: bron@bronze.SGI.COM (Bron Campbell Nelson) Newsgroups: comp.lang.fortran Subject: Re: Dubious Fortran Construct Summary: The VMS manual says no. Keywords: DO loops; transfer of control Message-ID: <23185@sgi.SGI.COM> Date: 10 Dec 88 02:19:29 GMT References: <22994@sgi.SGI.COM> <467@ur-cc.UUCP> <3677@s.cc.purdue.edu> Sender: daemon@sgi.SGI.COM Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 37 In article <3677@s.cc.purdue.edu>, ags@s.cc.purdue.edu (Dave Seaman) writes: > 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. > > 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. > I suppose this last comment is true as far as it goes, but I specifically asked the net whether or not the compiler that you use accepts this construct, and *also* asked whether or not you believe the construct is legal (regardless of whether or not the compiler accepted it). I was a bit surprised by the fact that the VMS compiler accepted it, obviously my memory is faulty. What I *do* know for sure is that the VMS manual specifically declares this construct to be illegal. As for my 2 cents: my compiler accepts it (but generates incorrect code); I think it is illegal and should give a syntax error, or at least a warning. -- Bron Campbell Nelson bron@sgi.com The opinions expressed are not necessarily those of the author's employer, are not necessarily those of the author's friends, are not necessarily even those of the author, and are probably not necessary.