Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!milton!dwip From: dwip@milton.u.washington.edu (Dave Pierce) Newsgroups: comp.lang.fortran Subject: Re: flush doesn't work with dec3100 f77 compiler Message-ID: <1991May28.174723.13979@milton.u.washington.edu> Date: 28 May 91 17:47:23 GMT References: <_Q1+34+@engin.umich.edu> <13203@uhccux.uhcc.Hawaii.Edu> Organization: University of Washington Lines: 40 ralph@uhheph.phys.hawaii.edu (Ralph Becker-Szendy) writes: >In article <_Q1+34+@engin.umich.edu> oliveria@engin.umich.edu (ROQUE DONIZETE >DE OLIVEIRA) writes (about the FORTRAB flush system routine): >>C Apparently the FLUSH routine doesn't work on the dec3100 (ultrix 3.1) >>C and dec5000 (ultrix 4.1). >Yes, it doesn't. I noticed that, within 1/2 day... [stuff deleted] Although the fortran routine doesn't work, the C routine does. I use the following for flushing fortran unit 6 (standard output). /* program myflush.c */ #include #include void myflush_() { fflush( stdout ); return; } compile the c program: cc -c -o myflush.o myflush.c In your fortran program, just use "call myflush()". When you compile the fortran program, link in myflush.o: f77 myflush.o prog.f Also note that this technique works for the 'random' function, if you have problems getting that to work under fortran (I certainly did!). >>C Roque Oliveira >>C oliveria@caen.engin.umich.edu >-- >Ralph Becker-Szendy UHHEPG=24742::RALPH (HEPNet,SPAN) >University of Hawaii RALPH@UHHEPG.PHYS.HAWAII.EDU --------------------------------------------------------------------------- D. Pierce University of Washington dwip@u.washington.edu