Hi. I use gfortran 4.4.3, f2py Version: 2, numpy Version: 1.3.0. when i try: subroutine poiss1d(phi0,pts,n_q,phi1) real,parameter::pi=3.14159265358979323846264338327950288,h=0.01,e=4.8E-10 real,parameter::Cq=2.0*pi*h**2 *e,Ca=0.5,Cd=0.5 ... end subroutine poiss1d and have an error: "Error: Parameter 'pi' at (1) has not been declared or is a variable, which does not reduce to a constant expression" but, when e is moved to the next string: subroutine poiss1d(phi0,pts,n_q,phi1) real,parameter::pi=3.14159265358979323846264338327950288,h=0.01 real,parameter::e=4.8E-10 real,parameter::Cq=2.0*pi*h**2 *e,Ca=0.5,Cd=0.5 ... end subroutine poiss1d all works -- why so?
Thu, 28 Jul 2011 00:17:24 +0400, timofey chernishev wrote:
Hi. I use gfortran 4.4.3, f2py Version: 2, numpy Version: 1.3.0.
when i try: subroutine poiss1d(phi0,pts,n_q,phi1) real,parameter::pi=3.14159265358979323846264338327950288,h=0.01,e=4.8E-10 real,parameter::Cq=2.0*pi*h**2 *e,Ca=0.5,Cd=0.5 ... end subroutine poiss1d
and have an error: "Error: Parameter 'pi' at (1) has not been declared or is a variable, which does not reduce to a constant expression"
Fortran 77 ignores characters beyond the 72th column (they do not fit on punch cards). Welcome back to the 60s.
participants (2)
-
Pauli Virtanen
-
timofey chernishev