Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: FORTRAN porting question Message-ID: <11447@lanl.gov> Date: 3 Apr 89 23:09:49 GMT References: <1868@quanta.eng.ohio-state.edu> Distribution: usa Organization: Los Alamos National Laboratory Lines: 31 From article <1868@quanta.eng.ohio-state.edu>, by kaul@icarus.eng.ohio-state.edu (Rich Kaul): > IF (I.EQ.J) GOTO 1000 > ... > DO 1000 K=1,77 > ... > 1000 CONTINUE Try doing: C HOPE THIS IS THE ONE YOU WANT, THE OTHER IS MUCH HARDER IF (I.EQ.J) GOTO 1001 ... DO 1000 K=1,77 ... 1000 CONTINUE 1001 CONTINUE If this fails to perform like you require, Try the following: C NOTE: THIS ONE MAY FAIL DUE TO K BEING UNDEFINED AT THIS POINT. IF (I.EQ.J) GOTO 1000 ... K=0 999 K=K+1 ... 1000 IF (K.LT.77) goto 999 These two sequences correspond to the only common 'extensions' to Fortran which allow the GOTO in your original example. Note that the original is non-standard, so you can't really expect any consistent behaviour from it.