Hello,
I'm afraid I don't see this as much of a question.
What's important is the values of lb, ub, and
not where those values originate nor how they were computed.
I think the whole definition of whole is whole.
"Parts is parts."
--
Cheers!
Dan Nagle
Purple Sage Computing Solutions, Inc.
On Wed, 22 Sep 2004 10:31:12 -0400, Aleksandar Donev
<[log in to unmask]> wrote:
>Hi,
>
>We currently say that one can deallocate an array pointer if it points
>to the "whole of an object that was created by allocation". What
>exactly does this mean (do we have a definition of whole?)? For
>example:
>
>real, dimension(:), pointer :: a, b
>integer :: lb, ub
>
>read(*,*) lb, ub
>allocate(a(lb:ub))
>read(*,*) lb, ub
>b=>a(lb:ub)
>deallocate(b)
>
>If the second input happens to be the same as the first, is this legal?
>I find it hard to believe vendors would check upon all pointer
>assignments whether it is the whole of an object, and if so, mark the
>appropriate descriptors (since many vendors do have fields to indicate
>if ALLOCATE was involved and details about the allocation).
>
>Thanks,
>Aleks
|