J3/13-207
To: J3
From: Van Snyder
Subject: Inquiry functions for designators such as a%b%c%...%z
Date: 2013 December 19
Title: Inquiry functions for designators such as a%b%c%...%z
Submitted by: Van Snyder
Status: For consideration
Basic functionality: Allow an inquiry function with an argument that is
a designator of the form a%b%c%...%z, even if more than one part-ref is
an array, or some part-refs are disassociated pointers or deallocated
allocatables.
Rationale: One cannot inquire properties of a component if a part-ref
that precedes it in a data-ref is a disassociated pointer or deallocated
allocatable, or if more than one part-ref is an array. There are no
simple work-arounds for this use in specification expressions.
Estimated impact: Minor
Markham M6 conformance: Remove simple deficiency, inconsistency and
discrepancy.
Detailed specification: Allow an inquiry function with an argument that
is a designator of the form a%b%c%...%z, even if more than one part-ref
is an array, or part-refs preceding the last one are disassociated
pointers or deallocated allocatables. The only allowed inquiries are
those that depend only upon the type and kind of the final part-ref:
BIT_SIZE, DIGITS, EPSILON, HUGE, KIND, NULL, PRECISION, RADIX, RANGE, or
TINY, or the inquiry functions in the intrinsic module IEEE_ARITHMETIC,
Draft edits: To estimate scope of project
Replace C618 with
C618 (R611) Except as an actual argument to the intrinsic functions
BIT_SIZE, DIGITS, EPSILON, HUGE, KIND, NULL, PRECISION,
RADIX, RANGE, or TINY, or the inquiry functions in the
intrinsic module IEEE_ARITHMETIC, there shall not be more
than one with nonzero rank, and a to
the right of a with nonzero rank shall not have
the ALLOCATABLE or POINTER attribute.
Insert a sentence in 13.1p2:
"In the argument to any of the intrinsic functions BIT_SIZE, DIGITS,
EPSILON, HUGE, KIND, NULL, PRECISION, RADIX, RANGE, or TINY, or the
inquiry functions in the intrinsic module IEEE_ARITHMETIC, a component
at any level of component selection may be a pointer that is not
associated with a target, or an allocatable component that is not
allocated."