[Fortran] Dump Data To File
1 PROGRAM MAIN 2 I = 1 3 J = 2 4 K = 11 5 Call DumpData(I,J,K) 6 END PROGRAM MAIN 7 8 SubRoutine DumpData(I,J,K) 9 OPEN( UNIT = 112 & 10 ,FILE = 'DumpErr.dat' & 11 ,FORM = 'FORMATTED' & 12 ,STATUS = 'REPLACE' & 13 ,ACCESS = 'SEQUENTIAL' & 14 ) 15 16 WRITE(112,*),"I = ",I 17 WRITE(112,*),"J = ",J 18 WRITE(112,*),"K = ",K+1 19 20 Close(112) 21 RETURN 22 End SubRoutine DumpData
大概就是文件操作~
~不再更新,都不让我写公式,博客园太拉胯了