[J3] RECURSIVE attribute?
Steve Lionel
steve at stevelionel.com
Tue Nov 29 21:49:56 UTC 2022
On 11/29/2022 4:32 PM, Van Snyder wrote:
> On Tue, 2022-11-29 at 15:28 -0500, Steve Lionel via J3 wrote:
>>
>> C723 A function name declared with an asterisk type-param-value shall
>> not be an array, a pointer, elemental, or pure. A function name
>> declared with an asterisk type-param-value shall not have the
>> RECURSIVE attribute.
>>
> Now that RECURSIVE is the default, does this constraint need to be
> revised so that it requires the NONRECURSIVE attribute?
>
Good question. The standard seems rather vague about whether RECURSIVE
or NON_RECURSIVE are really attributes - they're not mentioned in Clause
8 and mainly referred to as prefixes, though N2209 15.6.2.1p1 says, "A
subprogram is specified to have the NON_RECURSIVE attribute, or to be
elemental (15.9), pure (15.7), or a separate module subprogram
(15.6.2.5) by a prefix in its initial SUBROUTINE or FUNCTION statement."
There are a few other references now to "NON_RECURSIVE attribute". The
term "RECURSIVE attribute" no longer appears other than in what is now
C728. There is no concept I can see of a procedure having a "RECURSIVE
attribute", only that recursive references are allowed by default.
I think this would make a good Edit paper for February - I'm interested
to see what Malcolm thinks.
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20221129/04c5573e/attachment.htm>
More information about the J3
mailing list