-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Can anyone explain the logic of this if statem and the block it controls?
fox/common/m_common_buffer.F90
Line 219 in 6f60cf1
| if (i>0) then |
I'm finding that fortran (gfortran 9.4 on linux, specifically), complains about an end of record when I try to write a string with long lines (~2500 characters) separated by newlines, with the error in line 221.
From what I can tell, i (calculated in the previous source line) is the location of the newline, arbitrarily far into the string, so an arbitrarily large integer. As a result, the write statement that runs if a newline is found (i > 0) writes an arbitrarily long string to the file (from current location n to n+i-2).
I think some other logic is supposed to be used (maybe just put this if clause after the one that checks against MAX_BUF_SIZE?), but I don't quite understand what's supposed to be happening.