Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!casbah.acns.nwu.edu!earth!ravi From: ravi@earth.ce.nwu.edu (Ravi Sinha) Newsgroups: comp.lang.fortran Subject: Re: Fortran 90 status Message-ID: <1991May16.195328.727@casbah.acns.nwu.edu> Date: 16 May 91 19:53:28 GMT References: <13372@exodus.Eng.Sun.COM> <23881@lanl.gov> Sender: news@casbah.acns.nwu.edu (Mr. News) Distribution: comp Organization: Civil Engineering Dept., Northwestern University Lines: 28 Nntp-Posting-Host: earth.ce.nwu.edu In article <23881@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes: >2) Real and Double precision DO control variables. > > Agreed. There must have been a strong lobby from some vendor to get > these into the standard to begin with. Since I don't know much about how do loops are optimized, maybe someone can cast some light on this. Real DO control variables allow you to have loops like: DO r = 1,100000,0.1 ... ENDDO The replacement with integer DO control variable would be: rbegin = 1 rint = 0.1 DO i=1,1000000 r = rbegin + (i-1)*rint ... ENDDO Maybe someone can tell me why the second form is better from an optimization point of view, and why the first form should be disallowed. Ravi Sinha | Northwestern University | ravi@earth.ce.nwu.edu |