Fortran Coder

查看: 9123|回复: 2
打印 上一主题 下一主题

[文件读写] 读写错误,请帮忙。

[复制链接]

1967

帖子

12

主题

5

精华

论坛跑堂

臭石头雪球

F 币
1370 元
贡献
581 点

美女勋章热心勋章星光勋章新人勋章贡献勋章管理勋章帅哥勋章爱心勋章规矩勋章元老勋章水王勋章

楼主
发表于 2016-5-19 21:12:48 | 显示全部楼层
你把很多问题想复杂了。

[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
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-5-14 07:36

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表