How to flush stdout in Fortran 90?
问题 I see a lot online on using the flush function in Fortran to flush output. I am wondering, specifically for Fortran 90, and specifically for stdout, what form this should take as a one-liner to put into my code? My guess is flush(*) . 回答1: flush() is not a function, but either a non-standard intrinsic subroutine, and hence invoked in a call statement call flush(unit_number) or a standard statement in Fortran 2003, hence invoked as a statement flush(unit_number) Commonly, standard output is