[J3] Question to "The CFI_section function"
Tobias Burnus
burnus at net-b.de
Tue Nov 12 08:03:27 EST 2019
On 11/12/19 1:38 PM, Robert Corbett wrote:
> The second part of the "Description" portion of 18.5.5.7 describes what the lower bounds of the result should be. If the C pointer "lower_bounds" is a null pointer, the lower bounds of the result are the lower bounds of the source; otherwise, the lower bounds of the result are the values of the array addressed by the C pointer "lower_bounds".
I don't see those words in the spec – I only see words related to SOURCE
and not to RESULT. Quoting lines 26 to 32 of paragraph 3:
"The array section is equivalent to the Fortran array section
SOURCE(sectsub_1,sectsub__2, ...sectsub_n), where SOURCE is the array
described by source, n is the rank of that array, and sectsub_i is the
subscript lower_i if stride_i is zero, and the section subscript
lower_i:upper_i:stride_i otherwise. The value of lower_i is the lower
bound of dimension i of SOURCE if lower_bounds is a null pointer and
lower_bounds[i] otherwise. The value of upper_i is the upper bound of
dimension i of SOURCE if upper_bounds is a null pointer and
upper_bounds[i] otherwise. The value of stride_i is 1 if strides is a
null pointer and strides[i] otherwise. If stride_i has the value zero,
lower_i shall have the same value as upper_i."
Tobias
More information about the J3
mailing list