New: formatted reads with embedded blanks in input fields
8 answers - 548 bytes -

Formatted reads with embedded blanks in the input fields do not appear to be
working correctly for I and F edit descriptors. For example, using the edit
descriptor I3 to read in the value of an integer variable where the input field
contains
1 3
Yields the runtime error message
Bad value during integer read
Using the edit descriptor f5.0 for reading a double precision variable where
the input field contains
1 3 5
produces the resulting assinged value of the variable of 1d0
Very odd.
No.1 | | 218 bytes |
| 
Comment #1 from jvdelisle at gcc dot gnu dot org 2005-11-26 23:53
Please attach an actual example of the code so we can study it. This is
probably a duplicate of pr25039, but I need to see an example to confirm.
No.2 | | 125 bytes |
| 
Comment #2 from brad dot finney at humboldt dot edu 2005-11-27 00:00
Created an attachment (id=10347)
()
test code
No.3 | | 201 bytes |
| 
Comment #3 from brad dot finney at humboldt dot edu 2005-11-27 00:04
(From update of attachment 10347)
use input data
1 3 5
with inpter reads uncommented, use input data
1 3
No.4 | | 210 bytes |
| 
Comment #4 from jvdelisle at gcc dot gnu dot org 2005-11-27 00:34
Confirmed, we are deafaulting BLANK = to UNSPECIFIED rather than NULL as
required by F95 Standard.
Regression testing a patch now.
No.5 | | 491 bytes |
| 
Comment #5 from jvdelisle at gcc dot gnu dot org 2005-11-28 00:23
Subject: Bug 25109
Author: jvdelisle
Date: Mon Nov 28 00:23:28 2005
New Revision: 107588
URL:
Log:
2005-11-27 Jerry DeLisle <jvdelisle (AT) gcc (DOT) gnu.org>
PR libgfortran/25109
* io/unit.c (init_units): Set default flag to BLANK_NULL per
requirement of F95 standard. Set PAD_YES for stdin.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/unit.c
No.6 | | 359 bytes |
| 
Comment #7 from jvdelisle at gcc dot gnu dot org 2005-11-30 02:53
Subject: Bug 25109
Author: jvdelisle
Date: Wed Nov 30 02:53:18 2005
New Revision: 107699
URL:
Log:
2005-11-29 Jerry DeLisle <jvdelisle (AT) gcc (DOT) gnu.org>
PR libgfortran/25109
* io/unit.c (init_units): Fix missing semicolon.
Modified:
No.7 | | 427 bytes |
| 
Comment #6 from jvdelisle at gcc dot gnu dot org 2005-11-30 02:09
Subject: Bug 25109
Author: jvdelisle
Date: Wed Nov 30 02:09:13 2005
New Revision: 107697
URL:
Log:
2005-11-29 Jerry DeLisle <jvdelisle (AT) gcc (DOT) gnu.org>
PR libgfortran/25109
* io/unit.c (init_units): Set default flag to BLANK_NULL per
requirement of F95 standard. Set PAD_YES for stdin.
Modified:
No.8 | | 90 bytes |
| 
Comment #8 from jvdelisle at gcc dot gnu dot org 2005-12-02 06:10
Fixed on 4.1 and 4.2