[J3] Question to "The CFI_section function"
Dick Hendrickson
dick.hendrickson at gmail.com
Tue Nov 12 22:57:12 EST 2019
On Tue, Nov 12, 2019 at 9:11 AM Steve Lionel via J3 <
j3 at mailman.j3-fortran.org> wrote:
> On 11/12/2019 7:24 AM, Tobias Burnus via J3 wrote:
> > Follow-up question: what are the 'lower_bound's after a call to
> > CFI_establish (18.5.5.5)?
> >
> > For allocatables, the input is a null pointer/deallocated. And for
> > pointers, there is "if the attribute argument has the value
> > CFI_attribute_pointer, the lower bounds of the object described by dv
> > are set to zero."
> >
> > But what's about CFI_attribute_other? Shall they also start at 0 –
> > like most descriptors on the C side? Or at 1 as they would in Fortran
> > or …? The following sentence "The remaining properties of the object
> > are given by the other arguments." does not really help.
>
> In the C descriptor world, arrays start at zero as they do in C. The
> only way they can become non-zero is through argument association,
> allocation or pointer association as specified in 18.5.3p3. For
> non-pointer, not-allocatable objects (this means "other"), the lower
> bounds are supposed to be always zero. I'm not seeing a problem with the
> wording in that paragraph, though like a lot of the standard, your mind
> has to fill in blanks from elsewhere in the text.
>
> You need to be careful here, Steve. In the new free form source, you
can't fill in the blanks; they're significant!
Dick Hendrickson
> >
> > PS: Are there already some (draft) corrigenda for Fortran 2018? I
> > haven't seen any, but I might have missed them.
> Not yet.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20191112/7fb8643b/attachment.html>
More information about the J3
mailing list