To: J3 J3/24-169 From: Malcolm Cohen Subject: US-23/DIN-4: Generic processing of assumed-rank objects, overview Date: 2024-October-21 Reference: 24-136r1 1. Introduction This paper reviews the current state of the US-23/DIN-4 proposals, and suggests splitting them into three separate proposals which are independent of each other. This is not to make new WG5 proposals, merely to improve the organisation of this one. It should also be noted that there is some potential interaction between these features and US-07 "Improve rank-independent functionality", and also US-24 "Rank-independent looping". 2. The proposals (1) DIN-4I: intrinsics. All of the proposals here are problematic when an assumed-rank array is associated with an assumed-size array. Thus, they are subject to agreement being reached on what to do in that case. (a) Permit whole array reduction intrinsics of an assumed-rank array; that is, an array reduction with no DIM argument. These are ALL, ANY, IALL, IANY, IPARITY, MAXVAL, MINVAL, PRODUCT, PARITY, REDUCE, SUM. Some of these have an optional MASK argument, which might also be problematic. (b) Permit the whole array location intrinsics (these work in a very similar way to the reductions), again, no DIM argument. These are MAXLOC, MINLOC, and FINDLOC. Similarly, the optional MASK argument might be problematic. (c) Permit the LOGICAL->INTEGER reduction intrinsic COUNT, when there is no DIM argument. (d) Permit the array transformation intrinsic RESHAPE, when there is no PAD argument. Consistency might imply that we should allow RESHAPE of an assumed-size array in the same situation. (e) Permit the C_LOC function from the intrinsic module ISO_C_BINDING to be used with an assumed-rank target. (2) Proposal DIN-4M: Miscellaneous These are, of course, all subject to no technical problem being found. And also whether they are agreed to be actually useful. (a) As the target in a rank-remapping pointer assignment. (b) As the selector in a SELECT TYPE construct. This would necessarily expand the concept of assumed-rank to include an associate-name that is associated with assumed-rank. (c) If contiguous, as the actual argument for sequence association. (3) Proposal DIN-4X: Axxessing and traversing. (a) Syntax for traversing an assumed-rank array, presumably the same syntax could be used for rank-independent looping, and so this one needs to be developed in conjunction with US-07 and US-24. (b) Syntax for accessing an element of an assumed-rank array, possibly the same syntax we already use for rank-independent accesses. 3. Formal requirements For each of the three proposals, a separate paper will be submitted for the formal requirements. ===END===