[J3] ALLOCATE with source-expr determining the array bound & resulting lower bound
Tobias Burnus
burnus at net-b.de
Wed Dec 1 07:37:36 UTC 2021
On 01.12.21 00:09, Van Snyder wrote:
>> allocate(c, source=h(3))
I want to come back to my original question. I think we do agree what
lbound(h(3),1) gives (namely: 1) and, personally, I do not see an issue
with lbound.
However, for allocate with source-expr I still wonder about the bounds.
And I still think it would be useful to explicitly state that the lower
bounds comes from applying LBOUND to the source-expr. (Matching what is
done at several other places in the standard: intrinsic assignments to
allocatables, pointer association, 'associate', 'select rank'.)
> The result value of h(3) is allocatable and therefore its bound(s) are
> the ones specified when it was allocated (15.3.3, 15.5.3).
I note that Malcolm wrote elsewhere in this thread: “Only variables and
components can have the ALLOCATABLE attribute. The result of referencing
a function whose result variable has the ALLOCATABLE attribute is a
value that does not itself have the ALLOCATABLE attribute”
Tobias
More information about the J3
mailing list