Path: blob/main/numpy/f2py/tests/src/abstract_interface/foo.f90
1725 views
module ops_module12abstract interface3subroutine op(x, y, z)4integer, intent(in) :: x, y5integer, intent(out) :: z6end subroutine7end interface89contains1011subroutine foo(x, y, r1, r2)12integer, intent(in) :: x, y13integer, intent(out) :: r1, r214procedure (op) add1, add215procedure (op), pointer::p16p=>add117call p(x, y, r1)18p=>add219call p(x, y, r2)20end subroutine21end module2223subroutine add1(x, y, z)24integer, intent(in) :: x, y25integer, intent(out) :: z26z = x + y27end subroutine2829subroutine add2(x, y, z)30integer, intent(in) :: x, y31integer, intent(out) :: z32z = x + 2 * y33end subroutine343536