(j3.2006) Assumed type
Thu Jun 8 14:16:19 EDT 2017
> On Jun 8, 2017, at 12:56 PM, John Reid <John.Reid at stfc.ac.uk> wrote:
> Bill Long wrote:
>>> On Jun 8, 2017, at 5:00 AM, John Reid <John.Reid at stfc.ac.uk> wrote:
>>> Dear all,
>>> C709 says "An assumed-type entity shall be a dummy data object that does
>>> not have the ALLOCATABLE, CODIMENSION, INTENT (OUT), POINTER, or VALUE
>>> attribute and is not an explicit-shape array."
>>> These seem appropriate when all that is passed is the C address. But
>>> what about the case when the object also has assumed rank, in which case
>>> a C descriptor is passed, see [493:20-21]?
>> A C descriptor would be used for either assumed rank or assumed shape, if the routine was BIND(C). The combination of assumed type and assumed rank is used for MPI ?buf? arguments, which was a substantial use case motivating the TS.
> I think you are saying that other combinations, such as assumed type
> with allocatable, would be possible but we have decided not to offer them.
Yes. The main request was for assumed type combined with either assumed rank or assumed size. If I recall correctly, there was an intentional effort to keep things simple while satisfying the need. Some attributes could be actually problematic. VALUE, for example, can involve making a local copy of a data entity that you don?t know the size of. Some of the limitations, such as ALLOCATABLE, could be relaxed in the future if the use of TYPE(*) were expanded.
>>> The corresponding constraint for an assumed-rank object is C836:
>>> "An assumed-rank entity shall be a dummy data object that does not have
>>> the CODIMENSION or VALUE attribute."
>>> Should C709 say "An assumed-type entity that is not of assumed shape
>>> shall ..."?
>>> J3 mailing list
>>> J3 at mailman.j3-fortran.org
>> Bill Long longb at cray.com
>> Principal Engineer, Fortran Technical Support & voice: 651-605-9024
>> Bioinformatics Software Development fax: 651-605-9143
>> Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
>> J3 mailing list
>> J3 at mailman.j3-fortran.org
> J3 mailing list
> J3 at mailman.j3-fortran.org
Bill Long longb at cray.com
Principal Engineer, Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
More information about the J3