Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!sun-barr!newstop!sun!boise.Eng.Sun.COM!wsb From: wsb@boise.Eng.Sun.COM (Walt Brainerd) Newsgroups: comp.lang.fortran Subject: Re: Dates for the different versions of FORTRAN? Summary: Zero trip DO Message-ID: <140686@sun.Eng.Sun.COM> Date: 15 Aug 90 15:47:24 GMT References: <3093.26c6b1cd@cc.curtin.edu.au> <9008151155.AA11309@thep.lu.se> Sender: news@sun.Eng.Sun.COM Lines: 21 In article <9008151155.AA11309@thep.lu.se>, magnus@THEP.LU.SE (Magnus Olsson) writes: > > The later versions of Fortran (IV, 66, 77) are reasonably downward > compatible with each other, even though there are some discrepancies, > such as the handling of a degenerate DO loop (DO 10 I=1,0 ...). The STANDARD Fortran 77 was compatible with the STANDARD Fortran 66 because "zero-trip" DO loops were not legal in Fortran 66. Although many compilers allowed them as an extension (e.g., IBM), not all of them got it wrong. For example, CDC 1604 Fortran executed a "zero-trip" DO loop zero times (not once). Speaking of upward compatibility, I have a copy of the original Fortran manual for the IBM 704. It contains a nice example of a complete Fortran program, almost all of which is completely legal Fortran 90. One counterexample is a line containing the FREQUENCY statement. -- Walt Brainerd Sun Microsystems, Inc. wsb@eng.sun.com MS MTV 5-40 Mountain View, CA 94043 415/336-5991