当我的 f90 程序的一个子程序中出现某些情况时,我试图找到一种方法来设置中断顺序。是否有可能从中得到任何想法?代码方案如下所示:
/
modules
PROGRAM
allocate variables
CALL subroutines for initializing variables
...
do 1,max iterations
CALL subroutine1
CALL subroutine2
CALL subroutine3 !--> here I have the condition
...
...
end do
END PROGRAM
Subroutine subroutine3
...
if (condition = true) then ! what I want to do here is to break the program printing a message saying that it is stopped because condition is true)
end if
end subroutine 3
/
我会很感激你的帮助,
我对 fortran 很陌生,而且我是这个论坛的新手!
先感谢您,
阿尔伯特 P