强制fortran 2.0语句中的非数字字符

时间:2014-11-09 11:48:15

标签: fortran

我使用Force Fortran 2.0编译器来创建这个程序

program postprocessor
implicit double precision(a-z)
dimension f(20)
open(1,file='results.dat')
read(1,*) ! skip a line
do 1 i=1,2
1 read(1,*)f(i)
read(1,*) ! skip a line
do 2 i=3,5
2 read(1,*)f(i)
read(1,*) ! skip a line
do 3 i=6,14
3 read(1,*)f(i)
read(1,*) ! skip a line
do 4 i=15,17
4 read(1,*)f(i)
close(1)
open(1,file='task.res')
write(1,*)-f(15) ! max -> min
write(1,*)f(16)
close(1)
open(1,file='task.cns')
write(1,*)f(2)
write(1,*)f(17)
close(1)
end

虽然编译时算法没有错误,但它给了我以下信息:

C:\Users\kostas\Desktop\new.f:11.1:

read(1,*) ! skip a line                                                 
 1

    Error: Unclassifiable statement at (1)
    C:\Users\kostas\Desktop\new.f:12.1:

    do 3 i=6,14                                                             
     1
    Error: Non-numeric character in statement label at (1)
    C:\Users\kostas\Desktop\new.f:12.1:

    do 3 i=6,14                                                             
     1
    Error: Unclassifiable statement at (1)
    C:\Users\kostas\Desktop\new.f:13.3:

    3 read(1,*)f(i)                                                         
       1
    Error: Non-numeric character in statement label at (1)
    Fatal Error: Error count reached limit of 25.
    gfortran.exe: Internal error: Aborted (program f951)
    Please submit a full bug report.
    See <http://gcc.gnu.org/bugs.html> for instructions.

发生了什么事?

0 个答案:

没有答案