Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!bruce!dbrmelb!davidp From: davidp@dbrmelb.dbrhi.oz (David Paterson) Newsgroups: comp.lang.fortran Subject: Bug cured by debugging output. Message-ID: <711@dbrmelb.dbrhi.oz> Date: 10 Jan 90 03:29:45 GMT Organization: CSIRO, Div. Building Constr. and Eng'ing, Melb., Australia Lines: 27 I've been programming in Fortran 77 for ten years now and have seen all sorts of things but this is one of the strangest. The program below works perfectly when run with: Microsoft FORTRAN77 V3.31 August 1985 and Microsoft (R) 8086 Object Linker Version 3.04. CHARACTER*80 LINE DATA XLO,XHI,YLO,YHI/0.,10.,0.,10./ 49 WRITE(*,50) XLO,XHI,YLO,YHI 50 FORMAT(' Type XLO,XHI,YLO,YHI <',3(G9.3,','),G9.3,'>: ') READ(*,'(A80)') LINE WRITE(*,*) READ(LINE,*,END=49,ERR=49) XLO,XHI,YLO,YHI STOP END However, if the line 'WRITE(*,*)' is removed then the program fails miserably (endless loop). Why? ------------------------------------------------------------------- David Paterson CSIRO Division of Building, Construction and Engineering Highett, Victoria, AUSTRALIA