Old fortran code and getting an OPEN statement error using GNU

五迷三道 提交于 2021-02-13 17:30:31

问题


I'm trying to compile a very old code but I get this error while compiling the code

   Error: Syntax error in OPEN statement at (1)

The code:

      WRITE(LUTTO,'('' TYPE NAME OF FILE CONTAINING INPUT   : '',$)')
C      READ (LUTTI,'(Q,A)') NCHAR,FILNAM
      READ (LUTTI,'(A)') FILNAM
      NCHAR = len_trim(FILNAM)
C                                             ----- OPEN DATA FILE -----
      print *, "NCHAR"
      OPEN( UNIT           = LUINP, NAME  = FILNAM(1:NCHAR),
     $      STATUS         = 'OLD', RECL  =             80 ,
     $      CARRIAGECONTROL= 'LIST', ERR   =           9900 )

回答1:


name=... in the open statement is invalid

try file=... instead



来源:https://stackoverflow.com/questions/39809444/old-fortran-code-and-getting-an-open-statement-error-using-gnu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!