Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!relay.nswc.navy.mil!oasys!mimsy!dftsrv!jagubox.gsfc.nasa.gov!jim From: jim@jagubox.gsfc.nasa.gov (Jim Jagielski) Newsgroups: comp.lang.fortran Subject: Re: bug in IRIS f77 list-directed i/o Message-ID: <4918@dftsrv.gsfc.nasa.gov> Date: 16 Apr 91 11:52:49 GMT References: <1600002@acf3.NYU.EDU> Sender: news@dftsrv.gsfc.nasa.gov Reply-To: jim@jagubox.gsfc.nasa.gov (Jim Jagielski) Organization: NASA/Goddard Space Flight Center Lines: 50 In article <1600002@acf3.NYU.EDU> mcqueen@acf3.NYU.EDU (David McQueen) writes: } }We have observed what we think is improper behavior of list-directed i/o in a }Fortran program on our Personal IRIS running IRIX 3.3.1. } }Running the following program on our Personal IRIS: } } a = 0.0 } b = 0.0 } c = 0.0 } read(5,*,err=99) a,b,c } write(6,*) a,b,c } stop } 99 write(6,*)'error reading data' } stop } end } }with an input file which consists of a single line: }1 2 3 }elicits the (good) result: } } 1.000000 2.000000 3.000000 } }but running with an input file consisting of the line: }x y z }elicits the (we think bad) result: } } 0.0000000E+00 0.0000000E+00 0.0000000E+00 } }On a Sun 3/50 running SunOS 4.1 we obtain for the above two cases respectively } } 1.00000 2.00000 3.00000 } }and } }error reading data } }which we think makes more sense. } Yes, it makes more sense. However, the standard says nothing about "errors" in list directed input. So whatever the compiler does basically is fine. -- =========================================================================== #include =:^) Jim Jagielski NASA/GSFC, Code 711.1 jim@jagubox.gsfc.nasa.gov Greenbelt, MD 20771 "I object to all this sex on the television. I mean, I keep falling off!"