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: [gfortran] Fix list directed reads of real number


On Wednesday 15 December 2004 06:22, Bud Davis wrote:
> when reading
>
> "10,20,30"
>
> as REAL values, list directed, we were not eating the comma, so the
> next value was seeing a comma as it's first character, so it was
> unchanged. problem only occurred when parsing the first part of
> a real without a decimal point, " 10.0,20.0,30.0 " was OK.
>
>
> this patch handles this situation.  i added some more tests to the file,
> including one for " 10,,20,30 " which handles the null value
> list directed read.
>
>
> both steve and myself were on the same line of code, just slightly
> different fixes.
>
>
> No additional regressions, no changes in NIST F77 test results.
> Tested i686/gnu/linux FC2.

Yay!  Thanks for the explanation, now at least we know *what* was wrong.

> --bud
>
>
> 2004-12-15  Bud Davis  <bdavis9659@comcast.net>
>             Steven G. Kargl  <kargls@comcast.net>
>
> 	* io/list_read.c (read_real): do not push back a comma when
> 	it delimits a real value without a decimal point

OK of course :-)

Gr.
Steven


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