program find_close
implicit none
integer::i=0,k
character(len=512) :: cStr
character,parameter::C_define='define'
Open(12,File="model1_job1.dat")
Do
read(12,'(a512)',ioStat=k) cStr
if(k/=0) exit
cStr = adjustl(cStr)
if(cStr(:len(C_define))==C_define)then
i=i+1
endif
end do
write(*,*)i
close(12)
end program
微信截图_20200319002415.png (28.57 KB, 下载次数: 366)
4.85 KB, 下载次数: 1
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |