This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CREAD buggy?


From the information Jack gave I have produced this reduced case which gives a
error on the read.

      DOUBLE PRECISION XIN, YIN, ZIN, WIN, QIN
      CHARACTER*4 SID, RID, RID2, REN, IUP
      CHARACTER*5 A

CHARACTER*132 COMLYN

      COMLYN = "            abcd efgh jklmn      1.2345.678     21.765  2.34
     &  3.45xxxxxxWXYZ"

      PRINT *, COMLYN
      READ(COMLYN,'(12X,A4,1X,A4,1X,A5,3X,3F8.3,F6.2,F6.2,6X,A4)',
     &           ERR=8888) IUP,REN,A,XIN,YIN,ZIN,QIN,WIN,SID
      STOP
 8888 PRINT *, "READ FAILED"
      end

Eliminating the ERR=8888 in the READ produces the following:

At line 12 of file testio.f
Fortran runtime error: Bad value during floating point read

New PR23154.

Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]