[J3] Question about C704 in 22-007
Van Snyder
van.snyder at sbcglobal.net
Sat Feb 12 22:31:01 UTC 2022
C704 requires the value of the length parameter in a declaration-type-
spec that is not a colon or asterisk to be a specification expression.
Similarly, R817 and R818 require the bounds in an explicit-shape-spec
to be specification expressions.
I wanted to use the result of a function whose argument is a variable
declared in the inclusive scope as a length type parameter value.
Instead, I had to declare a variable, not otherwise used, and assign
the value of the function to it, before the BLOCK construct.
Is there a technical reason that these are required within a BLOCK
construct?
Item (4) in the list of properties of restricted expressions at [22-
007:166:45] seems to be the roadblock, because a "base object" that is
not declared within the BLOCK construct does not get "into" it from the
inclusive scope by host or use association.
We made the scoping rules for BLOCK constructs weird so that label
definitions would "leak out" to the inclusive scope. But otherwise, a
BLOCK construct is like an inlined internal procedure, where an object
from the inclusive scope would be accessed by host association.,
Can this be changed soon, e.g., by adding something like "or declared
within the inclusive scope of the BLOCK construct in which the
designator appears" in item (4)?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20220212/7bd1e203/attachment.htm>
More information about the J3
mailing list