parameterized derived types

parameterized derived types

galtay@andrew.cmu.edu's picture

Hi, I was just working through the description of the new Fortran 2003 features document by John Reid and couldn't get the parameterized derived types examples to compile. Are these supported in the current version of the Linux compiler? Example code below, thanks
-Gabe

TYPE matrix(kind,m,n)
INTEGER, KIND :: kind=KIND(0.0D0)
INTEGER, LEN :: m,n
REAL(kind) :: element(m,n)
END TYPE

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Kevin Davis (Intel)'s picture

No they are not. The earlier inquiry (here) also has link to current F2003 content.

$ ifort -V -c u70549.f90

Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20091012 Package ID: l_cprof_p_11.1.059
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

Intel Fortran 11.1-2620
u70549.f90(2): error #8040: Invalid type-name in a derived type definition. [MATRIX]
TYPE matrix(kind,m,n)
-----^
compilation aborted for jj.f90 (code 1)

Login to leave a comment.