home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
- From: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
- Subject: Re: flushing output in f77
- References: <141324@lll-winken.LLNL.GOV>
- Message-ID: <Bxn2r5.7Mw@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Reply-To: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
- Organization: MRL - UIUC
- Date: Fri, 13 Nov 1992 05:18:39 GMT
- Keywords: flush,i/o
- Lines: 31
-
- In article <141324@lll-winken.LLNL.GOV>, sterne@dublin.llnl.gov (Philip Sterne) writes:
- |>Is there a clean standard-conforming way of emptying the write
- |>buffer for a unit in f77?
- |> [...]
- |>
- |>I could use flush, but that appears to be architecture dependent.
- |>
- |>At the moment, the best (portable) plan I can come up is to open,
- |>write and close some file for each iteration.
- |>
- |>Is there a better way? For example, does a REWIND force a flush?
- |>Or is this vendor dependent? The standard doesn't seem to address
- |>this question.
-
- i had this very same problem and examined it some months ago
- by posting in this group. yes, the solution is vendor-dependent
- and there is no standard solution.
- for the platform i was interested in, AIX on RS6000, it seems that
- you have to close and reopen. i am using a routine that i call
- as CALL FLUSH(unit), just as in DECfortran and other
- architectures, which internally INQUIREs the file, discovers
- what the name is, closes it and reopens it. So my source is
- sort of "portable" now, at least between DEC and IBM RISCs.
- If you are interested in the routine email me
- and i will send you the source (or post it here).
- furio
- --
- Furio Ercolessi
- Materials Research Laboratory | Intl School for Advanced Studies
- Univ. of Illinois at Urbana-Champaign | Trieste, Italy
- furio@uiuc.edu | furio@sissa.it
-