James Giles wrote:
> > But, I didn't propose that unbuffered I/O be provided. I proposed that,
> > by default, all WRITE statements should be implemented to flush as
> > the last operation before control is returned to the user (on those
> > systems that require explicit flushes).
and Aleksandar Donev replied
> Sorry, that can't be done due to legacy codes---one cannot change this now, or
> a lot of codes will plumet in efficiency. What could maybe be added in some
> next revision is an OPEN keyword which allows one to turn buffering off, in
> the sense that every WRITE to that unit will be flushed immediately. Moot
> area of the standard anyway. How to deal with stdout though?
Make it a changeable mode. Then you can apply it to OUTPUT_UNIT from
ISO_FORTRAN_ENV to unbuffer stdout -- at least as far as the Fortran
library is concerned. I think there's an Unix mode to turn off buffering,
something like
setvbuf ( stdout, (char*)NULL, _IONBF, 1 );
It would be beyond the scope of the Fortran standard to say "do this;"
it would be a "quality of implementation" issue about which users could
complain to their vendors if they don't.
--
Van Snyder | What fraction of Americans believe
[log in to unmask] | Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Sean O'Keefe, George Bush, the Pope, or anybody else.
|