文件1行数不能确定所以我先读了一遍知道行数后再读具体的数据,不知道为什么这么读到unit11报错end-of-file during read, unit 11,求助!
[Fortran] 纯文本查看 复制代码 open(21,file="voronidata.dat")
do i=1,config
n=0
write(fil,*)i
open(12,file="1",action="read")
do j=1,line
read(12,"(A)",iostat=io)
n=n+1
if(io/=0)exit
end do
close(12)
open(11,file="1”,action="read")
do j=1,n+1
read(11,*)n3,n4,n5,n6,n7,fra(n3,n4,n5,n6),fra1,fra2
end do
close(11)
fract=fract+fra
end do
|