[Fortran] 纯文本查看 复制代码 Program www_fcode_cn
Real (Kind=kind(1.0D0)), Dimension (30, 30, 40) :: cc
Integer :: i
Open (Unit=10, File='cc.txt', Status='unknown') !// Open 语句移动到循环外面
Open (Unit=11, File='dd.txt', Status='replace')
Do i = 1, 30 !// 有多少行,就循环多少次。一层循环就足够了
Read (10, *) cc(i, :, :) !// 每次读取 30*40 个,即每次一行
Write (11, *) cc(i, :, :)
End Do
End Program www_fcode_cn |