next up previous contents
Next: Pure Functions Up: More on Procedures Previous: Side Effects   Contents

Argument Intent

In order to increase robustness to side-effects, and to facilitate efficient compilation, dummy arguments in the procedure declaration can be tagged with an intent attribute:

For example, in our norm2s subroutine we may declare

real, intent(in)  :: x,y,z
real, intent(out) :: r
Also, the norm2 function declarations may be
real, intent(in) :: x,y,z

Adrian Sandu 2001-08-26