Gfortran:将纯功能作为正常功能进行调试? [英] Gfortran: Treat pure functions as normal functions for debugging purposes?
本文介绍了Gfortran:将纯功能作为正常功能进行调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在使用gfortran编译的fortran程序中调试一些纯粹的
函数。有没有办法忽略纯粹的
语句,所以我可以使用写入
, print
等在这些
纯
函数没有很大的努力?
不幸的是,删除纯
语句是不容易的。
I need to debug some pure
functions in a fortran Program compiled with gfortran. Is there any way to ignore the pure
statements so I can use write
, print
, etc. in these pure
functions without great effort?
Unfortunately it is not easly possible to just remove the pure
statement.
推荐答案
您可以使用宏,并使用 -cpp
标志。
You can use a macro and use the -cpp
flag.
#define pure
pure subroutine s
print *,"hello"
end
这篇关于Gfortran:将纯功能作为正常功能进行调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文