(j3.2006) Select Rank

Van Snyder van.snyder
Wed Feb 18 15:55:19 EST 2015

SELECT RANK would need two different forms if we were to allow it both for
assumed-rank and known-rank entities.

For the known-rank case, which probably only has use in INCLUDE files 
(wherein one doesn't know which branches are dead), the shape of the 
<selector> would be known to the processor.

For the assumed-rank case, the shape of the <selector> would need to be 
specified, or otherwise divined.

At least for the known-rank case, and perhaps for the select-rank case 
if the shape can be divined or cleanly specified, I believe 
http://j3-fortran.org/doc/year/04/04-195.ps provides a better solution.  
The proposal in 04-195 has other useful attributes as well.

04-195 advocated to allow to subscript an array of rank R using a 
subscript of rank one and extent R.  There are already intrinsic 
functions that produce a rank-one array of extent R, such as UBOUND, 
SHAPE,nd FINDLOC.  It would be useful if one could use such an array 
directly as a subscript (or dimension specifier).


More information about the J3 mailing list