主题:新手上路,请教循环不闭合的问题
新手上路,用的语句都还比较简单。下面是我的程序,不知为何总显示说我的循环有问题。为节省大家时间,个人认为不必要的部分已做删减。还请各位大虾不吝赐教!谢谢!
use module (各数据类型已在此声明)
implicit none
open(unit=4,file="***")
do i=1,alldata (P.S.alldata是integer类型的常数,在模块中已赋值)
……(赋值语句)
do j=1,47588
……
begin=***
end do
do x=begin,47588
……
over=***
end do
do x=begin+1,over
if(Capacity(x)<Capacity(x-1))then
Crit=x
exit
end if
end do
……(赋值语句)
if(length>0) then
call correlation_bishop(i)
else
Nu_bishop=0
end if
……(调用一系列子程序,子程序中有迭代循环)
write(4,1)……
end do
1 Format(1x,19F20.5)
end
错误信息:
Syntax error, found IDENTIFIER 'DO' when expecting one of: ( * :: , <END-OF-STATEMENT> ; : ) + . - % (/ [ ] /) . ** / > ...
end do
------------^
E:\correlation prediction for comparision\correlation prediction.f90(110) : Error: This name does not have a type, and must have an explicit type. [END]
end do
--------^
E:\correlation prediction for comparision\correlation prediction.f90(110) : Error: This name does not have a type, and must have an explicit type. [DO]
end do
------------^
E:\correlation prediction for comparision\correlation prediction.f90(31) : Error: An unterminated block exists.
do i=1,alldata
其中的end do都是指向最后一个end do。
觉得明明都do和end do都匹配了啊,为什么会有说不闭合呢?还请高手指点一二!再次道谢!
use module (各数据类型已在此声明)
implicit none
open(unit=4,file="***")
do i=1,alldata (P.S.alldata是integer类型的常数,在模块中已赋值)
……(赋值语句)
do j=1,47588
……
begin=***
end do
do x=begin,47588
……
over=***
end do
do x=begin+1,over
if(Capacity(x)<Capacity(x-1))then
Crit=x
exit
end if
end do
……(赋值语句)
if(length>0) then
call correlation_bishop(i)
else
Nu_bishop=0
end if
……(调用一系列子程序,子程序中有迭代循环)
write(4,1)……
end do
1 Format(1x,19F20.5)
end
错误信息:
Syntax error, found IDENTIFIER 'DO' when expecting one of: ( * :: , <END-OF-STATEMENT> ; : ) + . - % (/ [ ] /) . ** / > ...
end do
------------^
E:\correlation prediction for comparision\correlation prediction.f90(110) : Error: This name does not have a type, and must have an explicit type. [END]
end do
--------^
E:\correlation prediction for comparision\correlation prediction.f90(110) : Error: This name does not have a type, and must have an explicit type. [DO]
end do
------------^
E:\correlation prediction for comparision\correlation prediction.f90(31) : Error: An unterminated block exists.
do i=1,alldata
其中的end do都是指向最后一个end do。
觉得明明都do和end do都匹配了啊,为什么会有说不闭合呢?还请高手指点一二!再次道谢!