主题:一个小程序不知道哪出错
program main
implicit none
integer counter
integer::fn-2=0
integer::fn-1=1
integer::fn=0
write(*,*)fn-2
write(*,*)fn-1
do counter=2,9
fn=fn-2+fn-1
write(*,*)fn
fn-2=fn-1
fn-1=fn
end do
end
编译之后
Error: Syntax error, found '-' when expecting one of: ( * , <END-OF-STATEMENT> ; [ / = =>
integer::fn-1=1
implicit none
integer counter
integer::fn-2=0
integer::fn-1=1
integer::fn=0
write(*,*)fn-2
write(*,*)fn-1
do counter=2,9
fn=fn-2+fn-1
write(*,*)fn
fn-2=fn-1
fn-1=fn
end do
end
编译之后
Error: Syntax error, found '-' when expecting one of: ( * , <END-OF-STATEMENT> ; [ / = =>
integer::fn-1=1