问题
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