(j3.2006) (SC22WG5.5373) [ukfortran] Question on PURE subroutines
Malcolm Cohen
malcolm
Thu Dec 4 20:25:07 EST 2014
[of a pure subroutine]
>Yet it appears to implement a side effect in a PURE procedure. Was this
>intended?
I should point out that if a pure subroutine cannot have a side effect, it can
be replaced by a NOP (since it has no return value).
Bill writes:
<<<
The issue that Reinhold points out is the case of a pointer appearing in a
variable definition context when its target is not a local variable, but one
that is declared in the specification part of a module. We prohibit direct
definition of such a variable in a pure procedure
>>>
No we do not. We do NOT prohibit direct definition of a variable that is "not a
local variable" in a pure subroutine, precisely when it is not INTENT(IN).
Which happens to be this case.
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list