next up previous contents
Next: Procedures and Array Arguments Up: Program Units Previous: Interface Example

Argument Intent

Hints to the compiler can be given as to whether a dummy argument will:

    SUBROUTINE example(arg1,arg2,arg3)
     IMPLICIT NONE
     REAL, INTENT(IN) :: arg1
     INTEGER, INTENT(OUT) :: arg2
     CHARACTER, INTENT(INOUT) :: arg3
     REAL :: r
      r = arg1*ICHAR(arg3)
      arg2 = ANINT(r)
      arg3 = CHAR(MOD(127,arg2))
    END SUBROUTINE example
The use of INTENT attributes is recommended as it:

For more information, click here gif

Now try this question gif


next up previous contents
Next: Procedures and Array Arguments Up: Program Units Previous: Interface Example

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996
Not for commercial use.