diff options
Diffstat (limited to 'doc/source/f2py/code/calculate.f')
-rw-r--r-- | doc/source/f2py/code/calculate.f | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/source/f2py/code/calculate.f b/doc/source/f2py/code/calculate.f new file mode 100644 index 000000000..4ff570d28 --- /dev/null +++ b/doc/source/f2py/code/calculate.f @@ -0,0 +1,14 @@ + subroutine calculate(x,n) +cf2py intent(callback) func + external func +c The following lines define the signature of func for F2PY: +cf2py real*8 y +cf2py y = func(y) +c +cf2py intent(in,out,copy) x + integer n,i + real*8 x(n), func + do i=1,n + x(i) = func(x(i)) + end do + end |