This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Mixed language i/o sychronization
Maybe I missed it in this discussion, but has anyone brought up the
subject of the F2003 FLUSH statement (which is also a common extension
in earlier versions)?
Of course, that isn't guaranteed to solve all interlanguage I/O
problems, but if I understand the particular current discussion, it
would seem that it should solve the current I/O synchronization one and
generally make the user's odds a lot higher.
It does require the user code to use the FLUSH statement, but I don't
feel that is an unreasonable requirement. I would expect that in normal
use, the number of places needing such synchronization would be modest.
Users *OUGHT* to expect to pay at least some attention to the matter;
if they think it will "just work" everywhere with no attention at all,
then their expectations don't much match reality. Using the FLUSH
statement allows the flushing to be done at the user-specified times
when it is actually needed, rather than loosing the benefits of
buffered I/O for the whole program or requiring the compiler to try to
guess when flushing is needed.
--
Richard Maine | Good judgment comes from experience;
Richard.Maine@nasa.gov | experience comes from bad judgment.
| -- Mark Twain