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: Buffered/unbuffered I/O issues


Tobias,

> I still wonder whether FX is not right in saying that
> GFORTRAN_UNBUFFERED_ALL is enough; for fine-grained unbuffering one can
> use the widely supported vendor extension, the FLUSH([unit]) subroutine,
> or Fortran 2003's FLUSH(unit) statement.

is the FLUSH statement supposed to work on stdout?
IBM's xlf 9.1 stops the execution on encountering a FLUSH(6):

1525-201 The FLUSH statement refers to unit 6 which is connected to a non-seekable device.  The FLUSH statement cannot be applied to non-seekable files.  The program will stop.

(Funnily, the IBM extension flush_, a subroutine, works for stdout).

Reading IBM's documentation and comparing to the F2003 draft standard,
it appears that this behavior is allows, although I find it strange.
IMHO flushing buffers has nothing to do with performing a seek.

Cheers,
-ha

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail


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