blob: 74eeb492e17a83742cabbf8c0513834f10b2b7a2 [file] [log] [blame]
! USER STORY 4, TEST 1
! Adds SAVE attribute to the declaration statements for variables sumOne and
! sumTwo initialized through the same DATA statement
PROGRAM MyProgram !<<<<< 1, 1, pass
CALL MySub
CALL MySub
END PROGRAM MyProgram
SUBROUTINE MySub
INTEGER, SAVE :: sumOne
INTEGER, SAVE :: sumTwo
DATA sumOne /100/ sumTwo /10/
sumOne = sumOne + sumOne
sumTwo = sumTwo + sumTwo
PRINT *, 'sumOne=', sumOne, 'sumTwo=', sumTwo
END SUBROUTINE MySub