[Fortran] 纯文本查看 复制代码
PROGRAM TEST_WRNF
IMPLICIT NONE
Real, Dimension(9,62) ::EPa
CALL EllipseP(EPa)
END
Subroutine EllipseP(EPa)
IMPLICIT NONE
Real, Intent(OUT), Dimension(9,62) :: EPa
Integer :: I, J
EPa=0.
OPEN (103 ,FILE='CEP.txt', STATUS='UNKNOWN')
Call Notes103
Do I=1,62
Read(103,*) (EPa(J,I), J=1,9)
Enddo
CLOSE(103)
End Subroutine EllipseP
Subroutine Notes103
CHARACTER*1 AX(80)
11 Read(103,'(80A1)')(AX(I),I=1,80)
Do I=1,80
If(AX(I)==']') Return
Enddo
GOTO 11
END
[Fortran] 纯文本查看 复制代码
Program test_wrnf
implicit none
real :: epa(9,5)
call EllipseP(epa)
contains
subroutine EllipseP(epa)
implicit none
real,intent(out) :: epa(:,:)
integer :: i, j
epa=0.
open (103 ,file='cep.txt')
call notes103()
do i = 1 , size(epa,dim=2)
read(103,*) epa(:,i)
enddo
close(103)
end subroutine EllipseP
subroutine notes103
character(len=80) :: ax
Do
read(103,'(a80)') ax
if ( index( ax , ']' ) > 0 ) return
End Do
end subroutine notes103
End Program test_wrnf