(j3.2006) (SC22WG5.3591) Assumed-type and Assumed-rank extensions for C Interop TR.

Van Snyder van.snyder
Fri Jul 25 04:27:45 EDT 2008


Aleksandar Donev wrote:
> 3) We should add a new RANK() intrinsic that can be used in 
> specification expressions. Bill pointed out to me that rank(x) = 
> size(shape(x)), but what's one more intrinsic to make codes more 
> readable :-)

rank(shape(x)) can be used in specification expressions, but not in 
initialization expressions if X is an assumed-shape array.

RANK() was proposed for Fortran 90 in about 1986.  I argued against it, 
back when I didn't appreciate the difference between specification and 
initialization expressions, and it disappearred.  I don't know whether 
it was my arguments that made the difference, or others objected as 
well, and more eloquently and effectively than I did.

> Speaking of intrinsics, do we really want to make the size of the SHAPE
> intrinsic (and others) possible not be a compile-time constant?


I have submitted an interp request whether size(lbound(A)) is an 
initialization expression
if A is an assumed-shape array and the lower bound either does not 
appear or is an initialization expression.  See 08-200r1.

One of the proposed answers is "Yes, no edits required."

--

Van




More information about the J3 mailing list