intel fortran怎么读取txt文件的行数

2024-11-27 11:25:07
推荐回答(1个)
回答1:

open (fff,file='xxx')
nline=0
do while(.ture.)
read(fff,*,iostat=ierr)fline
if(ierr/=0)exit
nline=nline+1
enddo
print *,'nline=',nline
close(fff)