home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / fortran / 4312 < prev    next >
Encoding:
Text File  |  1992-11-13  |  1.1 KB  |  34 lines

  1. Path: sparky!uunet!mcsun!uknet!strath-cs!cen.ex.ac.uk!JRowe
  2. From: JRowe@cen.ex.ac.uk (J.Rowe)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: flushing output in f77
  5. Message-ID: <BxnoG5.LnF@cen.ex.ac.uk>
  6. Date: 13 Nov 92 13:07:16 GMT
  7. References: <141324@lll-winken.LLNL.GOV>
  8. Sender: JRowe@cen.ex.ac.uk (J.Rowe)
  9. Organization: Computer Unit. - University of Exeter. UK
  10. Lines: 21
  11. In-Reply-To: sterne@dublin.llnl.gov's message of 12 Nov 92 22:10:39 GMT
  12.  
  13. In article <141324@lll-winken.LLNL.GOV> sterne@dublin.llnl.gov (Philip Sterne) writes:
  14.  
  15. >   Is there a clean standard-conforming way of emptying the write
  16. >   buffer for a unit in f77?  
  17.  
  18. Standard conforming? No. But what we do here in the Physics Department at
  19. Exeter is to have a tiny c routine:
  20.  
  21. #include <stdio.h>
  22. void flushout()
  23. {
  24.   fflush(NULL);
  25. }
  26.  
  27. which we can compile to an object file and then link to our fortran.
  28. It seems to work fine under SunOS, ConvexOS, AIX and HP-UX.  Some OSs
  29. demand an underscore to be added to the routine name in the c source,
  30. I can't remember whether it goes on the beginning of the name or the
  31. end.
  32.  
  33. John.
  34.