Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpfcdc!bruno From: bruno@hpfcdc.HP.COM (Bruno Melli) Newsgroups: comp.sys.hp Subject: Re: FORTRAN porting question Message-ID: <5570143@hpfcdc.HP.COM> Date: 4 Apr 89 15:41:19 GMT References: <1868@quanta.eng.ohio-state.edu> Organization: HP Ft. Collins, Co. Lines: 23 >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? Strictly fortran 77 speaking: Section 11.10.1 (ANSI F77 std): The range of a DO-loop consists of all of the executable statements ... including the terminal statement of the DO-loop. Section 11.10.8: Transfer of control into the range of a DO-loop from outside the range is not permitted. However you can use the +e option to turn on Vax compatibility mode and the compiler will let you jump into the loop. The generated code will behave the same way as the executable generated on the sun. You will loop for 77 times. (Assuming that K was 0)