【发布时间】:2013-11-09 15:37:32
【问题描述】:
我想创建一个返回函数作为输出的子例程。我怎样才能做到这一点?我将举一个我认为应该如何的例子(我知道它写得不好)
module fun_out
contains
subroutine exponential(F,a)
interface, intent(out)
function f(x)
real, intent(in)::x
real :: f(2)
end function
end interface
real,intent(in):: a
F=exp(a*x)
end subroutine exponential
end module
有了这个,我应该从输出中的指数族中获取一个函数。
【问题讨论】: