next up previous contents
Next: Simple External ProcedurE 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: Simple External ProcedurE Up: Save Attribute Previous: Save Attribute

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