One more possible source of confusion is that a scalar is "conformable" with an
array of any shape, in an ARRAY EXPRESSION such as 2.0 * A or (A + 3.5)
In F77 (and in F90 without explicit interface) you are essentially passing the
ADDRESS of a "bucket of bits" to the subprogram, and the subprogram reconfigures
the bits according to its own separate set of declarations. Using F90 explicit
interface, you can pass actual arguments WITH THEIR ATTRIBUTES, including array
shape (for assumed shape dummy arrays).
Loren P. Meissner
[log in to unmask]
> -----Original Message-----
> From: [log in to unmask]
> [mailto:[log in to unmask]]On Behalf Of Richard
> Maine
> Sent: Friday, November 06, 1998 8:54 AM
> To: [log in to unmask]
> Subject: array compatibility
>
. . .
> > compiler didn't compile this. I thought that constant is
> > compatible with any array.
. . .
>
> F77 (and by inclusion, f90) does have one odd situation in which
> scalars and arrays can get confused, but it doesn't apply to your
> situation. If you pass an element of an array as an actual
> argument, the dummy argument can be either a scalar or an array
> (if an array, it can't be assumed shape).
. . .
> Richard Maine
> [log in to unmask]
>
>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|