[J3] [EXTERNAL] Question about MOVE_ALLOC
Clune, Thomas L. (GSFC-6101)
thomas.l.clune at nasa.gov
Thu Mar 9 21:14:26 UTC 2023
On a related note, there may be a problem with some intrinsics that already do allow assumed-rank. E.g., for SHAPE:
SOURCE shall be a scalar or array of any type. It shall not be an unallocated allocatable variable or a pointer
21 that is not associated. It shall not be an assumed-size array.
Nothing there that indicates assumed-rank is permitted. And yet:
Result Value. The result has a value whose ith element is equal to the extent of dimension i of SOURCE,
27 except that if SOURCE is assumed-rank, and associated with an assumed-size array, the last element is equal to
28 −1.
Which implies that assumed-rank is permitted. I would hope the Arguments description would be a bit more explicit in such instances
E.g., for SIZE() it is explicitly acknowledged:
ARRAY shall be assumed-rank or an array. It shall not be an unallocated allocatable variable or a pointer
10 that is not associated. If ARRAY is an assumed-size array, DIM shall be present with a value less
11 than the rank of ARRAY.
From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of j3 <j3 at mailman.j3-fortran.org>
Reply-To: j3 <j3 at mailman.j3-fortran.org>
Date: Thursday, March 9, 2023 at 3:59 PM
To: j3 <j3 at mailman.j3-fortran.org>, j3 <j3 at j3-fortran.org>
Cc: "Clune, Thomas L. (GSFC-6101)" <thomas.l.clune at nasa.gov>
Subject: Re: [J3] [EXTERNAL] Question about MOVE_ALLOC
Van,
There are lots of intrinsics that should/need to be modified to allow assumed-rank arrays. This is targeted for F202Y. (On a related note, I’ve started a document that identifies intrinsics that should be extended to allow scalars, and hope to submit that as a paper to DATA in the near future.)
For the other intrinsics that do allow assumed-rank arrays, it is explicitly mentioned, so I think it is clear that MOVE_ALLOC does not currently allow assumed-rank.
If there is something in particular about MOVE_ALLOC, that warrants earlier treatment than others, please elaborate.
I.e., I see this as an extension, not an interp.
- Tom
From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of j3 <j3 at mailman.j3-fortran.org>
Reply-To: j3 <j3 at mailman.j3-fortran.org>
Date: Thursday, March 9, 2023 at 2:46 PM
To: j3 <j3 at j3-fortran.org>
Cc: Van Snyder <van.snyder at sbcglobal.net>
Subject: [EXTERNAL] [J3] Question about MOVE_ALLOC
Are the FROM and TO arguments to MOVE_ALLOC allowed to be assumed-rank arrays?
If not, does this need an interp?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230309/c4d70d27/attachment-0003.htm>
More information about the J3
mailing list