next up previous contents
Next: Random Number Generation Up: Save Attribute Previous: Save Attribute

Solution

      SUBROUTINE Proc()
       INTEGER, SAVE :: NumTimesCalled = 0
       NumTimesCalled = NumTimesCalled + 1
! ...
       PRINT*, "So far I've been called ",NumTimesCalled," times"
      END SUBROUTINE Proc


next up previous contents
Next: Random Number Generation Up: Save Attribute Previous: Save Attribute

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 14:10:26 GMT 1996