这是我的主要代码:
!* ... READ PROBLEM TITLE
READ (KGET1,*) TITLE(1)
WRITE (KPUT1,*) 'TITLE(1)= ',TITLE(1)
WRITE (KPUT1,*)
!... READ PROBLEM UNITS
READ (KGET1,*) UNITS(1)
WRITE (KPUT1,*) 'UNITS(1)= ',UNITS(1)
WRITE (KPUT1,*)
!... READ PROBLEM OTHER
READ (KGET1,*) OTHER(1)
WRITE (KPUT1,*) 'OTHER(1)= ',OTHER(1)
WRITE (KPUT1,*)
!... READ OPTIONAL INPUT INDICATOR
READ (KGET1,*) OPTION
WRITE (KPUT1,*) 'READ OPTIONAL INPUT?',OPTION
WRITE (KPUT1,*)
!....................................................................
!*** END MINIMAL INPUT ***
!....................................................................
!*** BEGIN OPTIONAL INPUT ***
!....................................................................
!... READ OPTIONAL INPUT OR SET DEFAULT VALUES
IF (OPTION) THEN
!......... READ DIAGNOSTIC REVIEW, REPORT, SAMPLE, WARNING ENABLERS
READ (KGET1,*) REVIEW, REPORT, SAMPLE, WARN !<-- line 579
WRITE (KPUT1,*) 'REVIEW=',REVIEW
WRITE (KPUT1,*) 'REPORT=',REPORT
WRITE (KPUT1,*) 'SAMPLE=',SAMPLE
WRITE (KPUT1,*) 'WARN=',WARN
这是我的输入文件
blah-blah-blah
ENGLISH
blah-blah-blah
.TRUE. OPTION
.TRUE. .FALSE. .FALSE. .TRUE. REVIEW,REPORT,SAMPLE,WARN
我收到此错误
At line 579 of file bob.f95 (unit=11, file ='cal.i1'
Fortran runtime error: bad repeat count in item 2 of list input
我认为它与列表有关,因为它读取文件中的其他值。也许是在阅读.TRUE。错误?任何帮助表示赞赏。