本帖最后由 vvt 于 2017-11-18 14:37 编辑
试试这样
[Fortran] 纯文本查看 复制代码 Program Main
Integer :: a(100)
Character(len=2) , parameter :: CRLF = char(13)//char(10)
Character(len=420) :: c
integer :: i , j
open(13,File="test.txt",access="direct",form="formatted",recl=420)
Do i = 1 , 4
do j = 1 , 100
a(j) = i*100 + j
end do
WRITE(c,120) (a(j:j+9),CRLF,j=1,100,10)
write(13,"(a)",REC=i) c
ENd Do
Close(13)
120 FORMAT(10(10i4,a))
End Program Main
|