[Fortran] 纯文本查看 复制代码 Program www_fcode_cn
Implicit None
Integer :: i , ierr
real :: x , y , z
character(len=32) :: c
Open( 12 , File = "gp_pos.txt" )
Open( 13 , File = "gp_pos_new.txt" )
Do i = 1 , 3
read( 12 , * ) c
End Do
Do
read( 12 , * , iostat = ierr ) i , c , x , y , c
if ( ierr /= 0 ) exit
i = len_trim( c )
read( c(1:i-1) , * ) z
write( 13 , * ) x , y , z
End Do
Close( 12 )
Close( 13 )
End Program www_fcode_cn |