(j3.2006) F2008: Bogus text in UDIO; IMAGE_INDEX question
Bill Long
longb
Mon Mar 28 14:49:05 EDT 2011
On 3/28/11 1:25 PM, Tobias Burnus wrote:
> Hello all,
>
> I have serious problems parsing the following sentence:
>
Not surprising.
> " , if contained a and the list item's corresponding edit descriptor was
> a DT edit descriptor."
>
This looks like left over text from the same part of Fortran 2003 that
was not removed when the first part of the sentence was edited.
> Yes, the sentence starts with space-comma-space. See: F2008 (N1830),
> "9.6.4.8.3 Defined input/output procedures", paragraph 13, last sentence
> of the 3 bullet point (page 226).
>
> * * *
>
> Secondly, I have a question regarding IMAGE_INDEX. One finds in the
> standard:
>
> "Result Value. If the value of SUB is a valid sequence of cosubscripts
> for COARRAY, the result is the index of the corresponding image.
> Otherwise, the result is zero.
> Examples. If A and B are declared as A [0:*] and B (10, 20) [10, 0:9,
> 0:*] respectively, IMAGE_INDEX (A, [0]) has the value 1 and IMAGE_INDEX
> (B, [3, 1, 2]) has the value 213 (on any image)."
>
> My question is: What meant by "valid sequence of cosubscripts"? Or in
> other words: Will the second IMAGE_INDEX in the example always return
> 213 or only if num_images()>= 213?
A set of cosubscripts is valid of each is within the cobounds for the
corresponding codimension, and the last is small enough such that the
result value is <= the number of images. The relevant text is in 6.6
paragraph 2 (page 125):
The number of cosubscripts shall be equal to the corank of the object.
The value of a cosubscript in an image selector shall be within the
cobounds for its codimension. Taking account of the cobounds, the
cosubscript list in an image selector determines the image index in the
same way that a subscript list in an array element determines the
subscript order value (6.5.3.2), taking account of the bounds. An image
selector shall specify an image index value that is not greater than the
number of images.
Cheers,
Bill
>
> Tobias
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://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