[J3] intrinsic procedures and assumed-rank
Steve Lionel
steve at stevelionel.com
Thu Oct 15 19:54:19 EDT 2020
On 10/15/2020 7:25 PM, Clune, Thomas L. (GSFC-6101) via J3 wrote:
> There almost certainly was a discussion of this at some point in the past, but I am seeing that while SHAPE(), SIZE(), UBOUND(), etc, can be used with an assumed-rank array, other things like MAXVAL() and MAXLOC() can not. I do not immediately see any reason why those could not be similarly extended, except maybe handling the case with MASK present would induce some (small) overhead?
>
> Could this be changed in F202x or more likely F202y?
>
As I see it, SHAPE, SIZE, UBOUND, etc. all return a scalar or a rank-1
array, no matter the rank of the argument. MAXVAL, etc., return a result
whose rank is one less than the rank of the ARRAY argument, which means
for assumed rank that the rank of the result is unknown at compile-time.
Remember that you can't do much with an assumed rank dummy outside of a
SELECT RANK construct.
Steve
More information about the J3
mailing list