(j3.2006) Select Rank

Robert Corbett robert.corbett
Tue Feb 17 17:10:52 EST 2015


On 02/17/15 13:49, Bill Long wrote:
>
> On Feb 17, 2015, at 3:37 PM, Van Snyder<Van.Snyder at jpl.nasa.gov>  wrote:
>
>> Borrowing from SELECT TYPE:
>>
>> select rank ( A )
>> case ( 1 )
>>   a(4) = 1
>> case ( 2 )
>>   a(2,3) = 1
>> end select
>>
>> See R841 in 15-007: the "<associate-name>  =>" part is optional.  So this
>> isn't a radical departure from current practice.
>
> Allowing A to appear with one subscript in one place and two in another is an extremely radical departure from current practice.  That problem is what the alternatives are intended to solve.
>

Although I hate adding a feature to the language at this point in the process, I 
see that something like SELECT RANK is needed if assumed rank arrays are to be 
used in Fortran codes.  I prefer the approach suggested by Van to the approaches 
suggested by Bill.  I see no problem with a construct name having different 
ranks in different blocks.

Bob Corbett



More information about the J3 mailing list