[Fortran] 纯文本查看 复制代码 Program www_fcode_cn
Implicit None
Character(len=256) :: c , cname , cvalue , a , b
Integer :: ierr , k
Open( 12 , File = '文件名' )
Do
Read( 12 , "(a256)" , ioStat = ierr ) c
If ( ierr /= 0 ) exit
k = index( c , "=" )
cname = c( : k-1 )
cvalue = c( k+1 : )
If ( cname == "报错文件名称" ) then
a = cvalue
Else If ( cname == "提醒文件名称" ) then
b = cvalue
End If
End Do
Close( 12 )
End Program www_fcode_cn |