Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ogccse!mwolfe From: mwolfe@ogccse.ogc.edu (Michael Wolfe) Newsgroups: comp.lang.fortran Subject: Zero vs. One trip loops ... correction Summary: Fortran-77 didn't REALLY break the -66 STANDARD Message-ID: <4513@ogccse.ogc.edu> Date: 1 Sep 89 14:31:09 GMT References: <1073@cernvax.UUCP> Reply-To: mwolfe@cse.ogc.edu (Michael Wolfe) Organization: Oregon Graduate Center, Beaverton, OR Lines: 20 for future reference, the real Fortran-66 standard did specify that all loops would 'trip' at least once. It also specified that the loop upper limit MUST BE GREATER THAN OR EQUAL TO the loop lower limit. Thus, the loop: N = 0 DO 10 I = 1,N 10 CONTINUE which trips zero times in Fortran-77, is NOT 'STANDARD-CONFORMING' according to Fortran-66. So, Fortran-77 did not break 'one-trip' loops, it only defined what to do when the upper limit was less than the lower limit. Fortran-66 did define different semantics for loop iteration processing, and most (or for all I know, all) Fortran-66 implementations would allow the above loop and would trip once. So the implementations were incompatible, but the standards weren't. Just goes to show how few people read the -66 standard. It's also interesting to see how small the -66 standard is, compared to the -77.