[SciPy-dev] f2py bugs with fortran 90

Bart Vandereycken bart.vandereycken at cs.kuleuven.be
Wed Nov 30 07:03:13 CST 2005


Hi all,

while processing a Fortran 90 module I discovered some problems/bugs.

1) Comments aren't always ignored, e.g. this subroutine is correctly 
parsed only without the comment
-----------------
SUBROUTINE TEST (a, b, c    &
! Optional arguments
x, y, z)
-----------------


2) INTENT(IN OUT) is the same as INTENT(INOUT) but crackfortran.py gives
-----------------
   File "....../f2py/crackfortran.py", line 2543, in vars2fortran
     lst = true_intent_list(vars[a])
   File "...../f2py/crackfortran.py", line 2451, in true_intent_list
     exec('c = isintent_%s(var)' % intent)
   File "<string>", line 1
     c = isintent_in out(var)
                       ^
SyntaxError: invalid syntax
-----------------


3) PUBLIC or PRIVATE objects within a module are not supported, e.g.
-----------------
MODULE Foo

PRIVATE
PUBLIC :: bar
PRIVATE :: foobar

CONTAINS

SUBROUTINE bar ...
END SUBROUTINE


SUBROUTINE foobar ...
END SUBROUTINE

END MODULE Foo
-----------------
gives
-----------------
{'attrspec': ['public']}
In: foo.f90:foo
vars2fortran: No typespec for argument "bar".
{'attrspec': ['private']}
In: foo.f90:foo
vars2fortran: No typespec for argument "foobar".
-----------------


Thanks in advance,
-- 
  Bart Vandereycken
  Scientific Computing Research Group,  K.U.Leuven
  www.cs.kuleuven.be/~bartvde
--

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




More information about the Scipy-dev mailing list