Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!gatech!gitpyr!loligo!mccalpin From: mccalpin@loligo.uucp (John McCalpin) Newsgroups: comp.lang.fortran Subject: Re: FORTRAN porting question Message-ID: <7846@pyr.gatech.EDU> Date: 4 Apr 89 20:32:58 GMT References: <1868@quanta.eng.ohio-state.edu> <330@uncw.UUCP> Sender: news@pyr.gatech.EDU Reply-To: mccalpin@loligo.UUCP (John McCalpin) Distribution: usa Organization: Supercomputer Computations Research Institute Lines: 26 In article <1868@quanta.eng.ohio-state.edu> kaul@icarus.eng.ohio-state.edu (Rich Kaul) writes: >... The code I have to port has lots of loops like: > IF (I.EQ.J) GOTO 1000 > ... > DO 1000 K=1,77 > ... > 1000 CONTINUE >My question is, how should this behave? ... Although this particular horse has been beaten to death, I just thought I should throw in a loop that occurred frequently in a code that I got to port once. if ( count.ge.1 ) goto 1000 do 1000 i=1,count do stuff here 1000 continue This was apparently an attempt to enable Fortran-77 style DO loops with a Fortran-66 compiler. Of course, in the modern world, it just manages to combine a redundant loop bounds check with an illegal jump. I'm sure that the programmer thought it was clever, though.... ---------------------- John D. McCalpin ------------------------ Dept of Oceanography & Supercomputer Computations Research Institute mccalpin@masig1.ocean.fsu.edu mccalpin@nu.cs.fsu.edu --------------------------------------------------------------------