[Fortran] 纯文本查看 复制代码 Subroutine NUM_LINE(Num)
02
Integer::Numline=0,value=0,Num
03
Character line
04
OPEN(UNIT=11,FILE='material.txt',STATUS='OLD')
05
Do While(value==0)
06
Read(11,*,iostat=value) line
07
If(value/=0)cycle
08
Numline=Numline+1
09
End Do
10
Num=Numline
11
Close(11)
12
End
|