(j3.2006) Is there any use for the DIM argument of THIS_IMAGE?

Bill Long longb
Mon Jan 11 08:58:39 EST 2016

On Jan 11, 2016, at 12:51 AM, Van Snyder <van.snyder at jpl.nasa.gov> wrote:

> I cannot imagine a use for the DIM argument of THIS_IMAGE.  I can't
> imagine wanting to know only one cosubscript.

Can you imagine anyone wanting to use DIM in similar situations such as UBOUND?  The goal was consistency in the forms of these similar inquiry functions.  Using DIM gives a scalar result.  I?ve seen it used for corank=1 just to avoid getting an array result. 

>  If I did want to know
> only one cosubscript, I would not find it onerous to put the list of
> them into an array and look at the interesting element of that array.

The point of the DIM argument is to provide a scalar result and avoid having to jump through these hoops. 


> As a consequence of having defined THIS_IMAGE the way we did, we can't
> extend it to inquire what the cosubscripts of COARRAY would be on a
> different image from the invoking one.
> Using a function named THIS_IMAGE to inquire cosubscripts seems weird
> anyway.
> Perhaps we can add a function COSUBSCRIPTS ( COARRAY [, IMAGE] ) that
> returns the cosubscripts of COARRAY on the invoking image if IMAGE is
> not present, or on IMAGE if it is present.
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3

Bill Long                                                                       longb at cray.com
Fortran Technical Support  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101

More information about the J3 mailing list