Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!ctrsol!cica!iuvax!rutgers!bellcore!att!cbnews!r4 From: r4@cbnews.ATT.COM (richard.r.grady..jr) Newsgroups: comp.lang.fortran Subject: Re: Standard conformance Message-ID: <9568@cbnews.ATT.COM> Date: 15 Sep 89 15:50:54 GMT References: <1301@tukki.jyu.fi> Reply-To: r4@cbnews.ATT.COM (richard.r.grady..jr,54354,mv,3a018,508 960 6182) Organization: AT&T Bell Laboratories Lines: 31 In article <1301@tukki.jyu.fi> markku@jytko.jyu.fi (Markku Sakkinen) SAKKINEN@FINJYU.bitnet (alternative) writes: > [ Markku complains that two Fortran-77 compilers (Digital's VAX/VMS > and Sun) do not complain about the illegal GOTO in the following > code.] > > INTEGER I, J > IF (I .LT. 100000) GOTO 2 > DO 9 I = 1, 10 > 2 J = I * I > WRITE (6, 100) I, J > 9 CONTINUE > 100 FORMAT (2I12) > END > > It contains a GOTO into a DO loop, which is illegal in Fortran-77. I tried this code with the f77 (Fortran-77) compiler on my Unix system (SYS V). It compiled without complaint. It also executed without complaint. There was only one line of output, and the result depended upon whether the output was directed to the standard output (terminal) or to a file: Output file I J 0 2135329856 fort.out 0 -2147343360 2fort.out 0 1593912976 zzzzqqqqzqzq 0 -2146113776 -- Dick Grady r_r_grady@att.com ...!att!mvuxd!r4