[J3] Question on dummy CLASS(*) pointer arguments

Steve Lionel steve at stevelionel.com
Wed Nov 29 18:07:16 UTC 2023


On 11/29/2023 1:01 PM, Brad Richardson via J3 wrote:
> It's disallowed because the `intent(in)` only applies to the 
> association status with the pointer attribute. I.e. it doesn't say 
> you're not allowed to assign to the target, and assigning to the 
> target could change the dynamic type. At least I think that covers the 
> main reason. There's lots of other nuances that could come into play 
> in certain cases.

We've had discussions for years about adding some way of "protecting" 
the target of a pointer, but could not come to a general agreement as to 
how it should look or work. It was one of the deferred work items for 
F2023 (US-21) - see 18-144r1 and 21-195, as well as discussion in US-27 
Pointer intent - J3 Work Items (j3-fortran.org) 
<https://j3-fortran.org/forum/viewtopic.php?f=17&t=30> (J3 members only).

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20231129/100d5783/attachment.htm>


More information about the J3 mailing list