Function call stopping/hanging when containing a write-statement, but only when linking with certain libraries during compilation

故事扮演 提交于 2019-12-05 13:54:42

As far as I remember, it is not standard conforming to call recursively the WRITE keyword.

To correct you program, modify slightly your main program

program test    
  implicit none
  real :: testfunc,result
  write(*,*) "Writing from main"
  result=testfunc()
  write(*,*) result
end program test

From my point of new, the trouble you met has therefore nothing to do with the used libraries but the symptoms of the mistake may change in that case (from apparently no bug to a crash).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!