(j3.2006) Does F2015 allow assumed-rank components in derived types?
Tom Clune
Thomas.L.Clune
Mon Jan 12 20:30:30 EST 2015
On Jan 12, 2015, at 8:11 PM, Malcolm Cohen <malcolm at nag-j.co.jp> wrote:
> Tom Clune asks:
>> Does F2015 allow assumed-rank components in derived types?
>
> Ask Bill replied, no.
>
> Assumed rank is only for dummy variables. Just like assumed shape. And unlike
> assumed shape, it is really only for interoperation with C.
>
> If we were to add a concept of "deferred rank" we could then have (nondummy)
> pointers and allocatables of deferred rank, just as we do for deferred shape;
> this would include components.
Right. I should have caught that nuance in the name. In developer-land, we rarely refer to ?deferred shape?, preferring to just say dynamically allocated.
>
> However, that would be pretty useless without a few other things like SELECT
> RANK. It would be significant work to develop this idea.
Hmm. ?select case (rank(foo))? seems to be close enough to get real work done. I really do think that with just that and existing features (shape(foo), c_f_pointer(), etc) one could make some useful packages that rely on deferred rank. But certainly a handful of new features would improve developers? ability to exploit deferred rank.
This capability is not at the top of my priorities, but does seem to be a natural ?closure? of existing syntax.
Cheers,
- Tom
>
> Cheers,
> --
> ................................Malcolm Cohen, Nihon NAG, Tokyo.
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
Thomas Clune, Ph. D. <Thomas.L.Clune at nasa.gov>
Head ASTG,Code 606
NASA GSFC
MS 610.8 B33-C128
Greenbelt, MD 20771
301-286-4635
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20150112/0f4b7d20/attachment.html
More information about the J3
mailing list