Print

Print


----- Original Message -----
From: "frank_ouyang" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, January 16, 2002 2:13 PM
Subject: how can I deal with dynamic array?


>
> subroutine BB(A,m,n)
> real A(*,*)
>      ^^^^^^? Corret?

Only the final dimension may be specified with an *. That is a Fortran 77
feature called assumed-size array that has been superseded by the Fortran
90
feature called assumed-shape array. Here your array definition in BB must
be
given as

real A(:, :)

and the feature requires an explicit interface, so BB is best made an
internal subroutine or placed in a module that is USEd by the calling
procedure (see also "Fortran 90/95 Explained", Section 6.3). You no longer
need pass n and m as aruments.

Hope that helps,

Mike Metcalf