[J3] [EXTERNAL] Re: C_PTR not allowed in SEQUENCE types?

Clune, Thomas L. (GSFC-6101) thomas.l.clune at nasa.gov
Thu Mar 11 15:31:17 UTC 2021


Hi Bill,

Thanks - but I'm don't feel much the wiser.   I thought the point of SEQUENCE is to ensure that the addresses and sizes of all contained entities were precisely constrained.    We allow other 64 bit entities (E.g. 64 bit reals, 64 bit ints).  How is being unsigned relevant?      Indeed, how does the internal representation of C_PTR matter aside from that the processor know its size and that it is contiguous?

As for obsolescence, the feature is certainly rarely used, but there are places where it got used heavily prior to F2003 and in practice is just as portable as BIND(C), which limits incentives for updating.    (As Reinhold's example demonstrates.)

- Tom


On 3/11/21, 9:29 AM, "J3 on behalf of Bill Long via J3" <j3-bounces at mailman.j3-fortran.org on behalf of j3 at mailman.j3-fortran.org> wrote:



    > On Mar 11, 2021, at 8:09 AM, Clune, Thomas L. (GSFC-6101) via J3 <j3 at mailman.j3-fortran.org> wrote:
    > 
    > Is there a fundamental reason that C_PTR cannot be a SEQUENCE type?

    There are pretty severe restrictions on the types of components that can appear in a SEQUENCE type.   It would seem unreasonable to impose those restrictions on the (private) components of C_PTR.   In practice, there is only one component in C_PTR, and it is an unsigned 64-bit address.  The limits on SEQUENCE types do not accommodate that sort of component. 


    On a related issue, I'm not really sure why SEQUENCE is not already in the list of Obsolescent features. 

    Cheers,
    Bill

    >  
    > I won’t admit to the terrible kludge that I’m attempting that led me to face this issue.   But he kludge aside, this seems to me at first glance to be a very reasonable and minor extension.

    Bill Long                                                                       longb at hpe.com
    Engineer/Master , Fortran Technical Support &   voice:  651-605-9024
    Bioinformatics Software Development                      fax:  651-605-9143
    Hewlett Packard Enterprise/ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425







More information about the J3 mailing list