At 12:28 on 27 August, 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, that an OPEN statement
> option be provided that allows a programmer to override that default
> for files the programmer is certain won't cause deadlocks and other
> problems if FLUSH is forgotten.
Flushing before returning control to the user seems an obvious thing
to do, and I'm surprised that any system wouldn't do it. However it
wouldn't meet my needs. I want FLUSH when I'm running long programs,
either under development or for calculations that may go off the rails
for one reason or another, and I want to print out a small amount of
diagnostic information at intervals so that I can see what's
happening. I don't want to interact with the program -- I just want to
kill it if it's not working. In this situation I don't want the system
to wait until the buffer is full before printing this stuff.
Making unbuffered output an option would meet this need, but FLUSH is
adequate as far as I'm concerned.
--
Anthony Stone http://www-stone.ch.cam.ac.uk/
University Chemical Laboratory, Email: [log in to unmask]
Lensfield Road, Phone: +44 1223 336375
Cambridge CB2 1EW Fax: +44 1223 336362
|