Problems with parametrized derived types in Fortran 2003 -


i'm teaching myself fortran 2003 use research project i'm working on. i'm used fortran 90, project requires use of parametrized types, , i'm moving on 2003.

i following this site's description of how define parametrized type, , wrote simple example program based on site's example test out:

module example implicit none    type :: param_matrix(k,a,b)      integer, kind :: k      integer, len ::      integer, len :: b      real(kind=k), dimension(a,b) :: m   end type param_matrix  end module example 

when compile command

gfortran -c test.f03 

i errors

test.f03:4.2:    type :: param_matrix(k, a, b)    1  error: unclassifiable statement @ (1)  test.f03:5.13:       integer, kind :: k               1  error: invalid character in name @ (1)  test.f03:6.13:       integer, len ::               1  error: invalid character in name @ (1)  test.f03:7.13:       integer, len :: b               1  error: invalid character in name @ (1)  test.f03:8.16:       real(kind=k), dimension(a,b) :: m                  1  error: symbol 'k' @ (1) has no implicit type  test.f03:9.5:    end type param_matrix       1  error: expecting end module statement @ (1) 

when remove parametrized parts of formula, compiles fine (that is, recognizes type). seems having particular trouble specific fortran 2003, when run command

-std=f2003 

it still has same problems. might going on?

parameterized derived types not yet implemented in gfortran:

https://gcc.gnu.org/wiki/oop (see unimplemented features)

currently, cray, pgi, , ibm fortran compilers support feature:

http://fortranwiki.org/fortran/show/fortran+2003+status


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -