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: [PATCH, libgfortran] PR25039 Comma short circuit read field


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


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