On Tue, Aug 8, 2017 at 9:56 PM, Malcolm Cohen <[log in to unmask]> wrote:
> ..
> Actually it's not just the kind type parameter that is wrong it is also the
> length type parameters. The dummy is declared CLASS(T1) which is equivalent
> to CLASS(T1(KIND(0.0),1,1)), but the actual argument also has length type
> parameters NLEN=50 NUMBER=3.
>..
Hopefully OP and other interested readers will have noted the
possibility of using deferred parameter syntax (*) with the length
type parameters which can then provide a measure of genericity to the
procedures that operate on the type, as was shown in the code snippet
of my earlier response:
---- code snippet -----
...
contains
subroutine s..( amph )
class( t1(mass_kind=xx,nlen=*,number=*) ) :: amph(:) ! where xx
is a suitable kind value
...
---- end snippet -----
Vipul
|