Gene Wheeler
Herff Professor of Structural Mechanics
Civil Engineering Department
The University of Memphis
[log in to unmask]
----- Original Message -----
From: "Aleksandar Donev" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Tuesday, April 13, 2004 9:04 AM
Subject: Re: Quick allocate question
> Drew McCormack wrote:
>
> > Is this legal?
> >
> > real, pointer :: a(:), b(:)
> > allocate( a(10) )
> > b => a
> > deallocate( b )
>
> Yes, the restriction is that b has to be associated with
the whole of
> the allocation, which it is in this case. Essentially as
far as Fortran
> is concerned b=>a makes b equivalent to a.
>
> I think it would have been legal even if
> b=>a(1:10)
> Right?
>
> Best,
> Aleksandar
> P.S. This is taken from the F2x standard (6.3.3.2), but I
am pretty sure
> it has not changed since F90.
|