【发布时间】:2016-01-22 07:14:26
【问题描述】:
我的代码看起来像
subroutine sub1(f)
interface
function f(x)
(description of f)
end function f
end interface
(do something with f)
end subroutine sub1
subroutine sub2(f)
interface
function f(x)
(description of f)
end function f
end interface
(do something with f)
end subroutine sub2
但是,sub1 和 sub2 这两个子例程都使用相同的接口用于哑函数 f。如何使这两个程序共享相同的界面(例如使用模块)?我必须使用过程指针吗?
【问题讨论】:
标签: fortran fortran2003