プログラムが予期せずに終了した場合にデータが失われないようにするために、 flush_ サブプログラムを使用して、バッファリングしたデータをファイルに書き込むことができます。
USE XLFUTILITY PARAMETER (UNIT=10) DO I=1,1000000 WRITE (10,*) I CALL MIGHT_CRASH ! If the program ends in the middle of the loop, some data ! may be lost. END DO DO I=1,1000000 WRITE (10,*) I CALL FLUSH_(UNIT) CALL MIGHT_CRASH ! If the program ends in the middle of the loop, all data written ! up to that point will be safely in the file. END DO END