码迷,mamicode.com
首页 > 其他好文 > 详细

[Fortran] Dump Data To File

时间:2014-12-09 11:53:36      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   ar   color   os   sp   for   on   

bubuko.com,布布扣
 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
main.f90

bubuko.com,布布扣

 

大概就是文件操作~

[Fortran] Dump Data To File

标签:style   blog   http   ar   color   os   sp   for   on   

原文地址:http://www.cnblogs.com/alimy/p/4152754.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!