[gfortran] Fix list directed reads of real number

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Dec 10 21:53:00 GMT 2004


On Fri, Dec 10, 2004 at 11:27:27AM -0800, Steve Kargl wrote:
> On Wed, Dec 08, 2004 at 10:25:36PM -0800, Steve Kargl wrote:
> > The attached patch fixes a bug in the list directed read of
> > several values from a single line.  This patch has been
> > bootstrapped and regression tested on i386-*-FreeBSD6.0.
> > It actually fixes 4 failures in the testsuite.
> 
> This patch also appears to fix PR 17597.
> 

Crud!  The patch doesn't totally fix the problem.

troutmask:sgk[330] gfc -o fg fg.f90
troutmask:sgk[331] ./fg
 10,-20,30,40                                                                    
   10.00000       0.000000       30.00000       40.00000    
troutmask:sgk[332] cat fg.f90
program fg
  character(len=80) buff
  write (buff,'(a)') '10,-20,30,40'
  read(buff,*) a, b, c, d
  print *, buff
  print*, a, b, c, d
end program

If a minus sign follows a comma, my  patch appears to miss
the next digit.

-- 
Steve



More information about the Fortran mailing list