pearu / f2py

Automatically exported from code.google.com/p/f2py
Other
54 stars 37 forks source link

Are INTERFACE blocks possible with f2py? #42

Open mauimuc opened 8 years ago

mauimuc commented 8 years ago

It appears to me f2py isn't treating INTERFACE blocks right. Try that code:

pure subroutine sub1(i, o)
  implicit none
  integer, intent(in) :: i
  integer, intent(out) :: o

  interface 
    pure subroutine sub2(i, o)
      integer, intent(in) :: i
      integer, intent(out) :: o
    end 
  end interface

  call sub2(i, o)

end 

pure subroutine sub2(i, o)
  implicit none
  integer, intent(in) :: i
  integer, intent(out) :: o

  o = 2*i

end 

I am using f2py version 2.45.241 which comes with Ubuntu 14.04.