This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, libgfortran] PR25039 Comma short circuit read field
- From: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: jvdelisle at gcc dot gnu dot org
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, iwan at irs dot phy dot nrc dot ca
- Date: Thu, 08 Dec 2005 05:59:57 +0100
- Subject: Re: [PATCH, libgfortran] PR25039 Comma short circuit read field
- References: <4393D5AD.8050108@verizon.net> <43975256.2040806@wanadoo.fr> <43977C8C.9030301@verizon.net>
Jerry
Is this I9 with 7 spaces really correct/desirable? It does not
check the comma short-circuiting, does it?
Normally the read would see that first comma in the file while it is
expecting a digit and error out. So I am checking two things here,
that reading into i1 stops at the comma and the next record for i2
starts just after the comma. Then in the reading of i2, I am checking
that the spaces are interpreted as NULLs. (I am doing that because the
default NULL settings on the files were messed up and I was fixing
that at the time too)
I was minded that the test of the comma short-circuiting could be tested
with
write(10,'(a)') "1, 235"
and do not like the other abomination. However, if it's legal, let it
be. *sigh*
The only issue is that I did not see Iwan's patch until after I did
mine. His patch is fine, though I don't think it is necessary to
reset the eor flag as he did since the eor condition gets caught above
this code. Iwan's patch adds an argument to read_block, which is Ok.
When I was thinking about it at the time I thought I would just add a
flag bit, instead. I have also added in the std_notify code since
this is outside of F95 standard behavior.
Modulo a reply to the last query, this is OK for committing on trunk
and 4.1.
OK for OK
Cheers
Paul