next up previous contents
Next: Solution Up: Procedures Previous: Solution

 

Local Variables

At each of the indicated points in the code, give the status (local, dummy argument, host associated or undefined) and, if appropriate, the values of the variables v1, v2, v3, v4, r and i.

    PROGRAM PerOg
     IMPLICIT NONE
     REAL    :: V1,V2
     INTEGER :: V3,V4
      V1 = 1.0
      V2 = 2.0
      V3 = 3
      V4 = 4
       ...
   !------ Position 1
       ...
      CALL Inte(V1,V3)
       ...
   !------ Position 2
       ...
      CALL Exte(V1,V3)
       ...
   !------ Position 3
       ...
    CONTAINS
     SUBROUTINE Inte(r,i)
      REAL, INTENT(INOUT) :: r
      INTEGER, INTENT(INOUT) :: i
      INTEGER :: v2 = 25
       ...
   !------ Position 4
       ...
       r = 24.7
       i = 66
       v4 = 77
       ...
     END SUBROUTINE Inte
   END PROGRAM PerOg

Go back to Notes gif




next up previous contents
Next: Solution Up: Procedures Previous: Solution

©University of Liverpool, 1997
Thu May 29 10:11:26 BST 1997
Not for commercial use.