How do you change the function declaration by adding pure? For example, for the following function, virngpoisson( method, stream, n, r, lambda )
Only the output vector, and stream may be changed after the function call. It has no other side effect. If they are taken as the output value, it is fine to define the subroutine as pure.
[fortran]interface pure subroutine vdcdfnorm(n,a,r) integer,intent(in) :: n real(kind=8),intent(in) :: a(n) real(kind=8),intent(out) :: r(n) end subroutine end interface[/fortran]
Is this OK?