Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!aries!mcdonald From: mcdonald@aries.scs.uiuc.edu (Doug McDonald) Newsgroups: comp.lang.fortran Subject: Re: EQUIVALENCE, COMPUTED GO TO in FORTRAN 88? Message-ID: <1989Dec9.153357.25886@ux1.cso.uiuc.edu> Date: 9 Dec 89 15:33:57 GMT References: <143@suntc.UUCP> <580@unmvax.unm.edu> <581@unmvax.unm.edu> Sender: news@ux1.cso.uiuc.edu (News) Reply-To: mcdonald@aries.scs.uiuc.edu (Doug McDonald) Organization: School of Chemical Sciences, Univ. of Illinois at Urbana-Champaign Lines: 22 In article <581@unmvax.unm.edu> brainerd@unmvax.unm.edu (Walt Brainerd) writes: >7. DO loops with real and dp DO variables can be rewritten using an > integer DO variables and an assignment to the replaced DO variable. This is not true. You could not be guaranteed of getting the exact same effect. The only way to do this is with if statements on the previous loop variable itself and goto's, along with explicit adding of the increment. But admittedly it is very easy. > > >(The computed GO TO could be replaced by block IFs, but not >as gracefully and efficiently, but will be replaceable by the 8x >CASE statement.) > Certainly these will work, but they are not as clean in certain cases. In some cases they will provide a "better" replacememt, in other cases not so good. Doug McDonald