我需要调试一些 pure
用 gfortran 编译的程序中的函数。有什么办法可以忽略 pure
声明以便我可以使用 write
, print
等在这些pure
功能不费力?
不幸的是,要删除 pure
并不容易。陈述。
最佳答案
您可以使用宏并使用 -cpp
旗帜。
#define pure
pure subroutine s
print *,"hello"
end
关于debugging - Gfortran:出于调试目的将纯函数视为普通函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19037789/