blob: 9d03b9683e1962cff5e2a78bbbc2c2bc05782773 [file] [log] [blame]
! USER STORY 4, TEST 3
! Adds SAVE attribute to the declaration statements for variables i, j, and k
! initialized through the same DATA statement (alternate arrangement of DATA
! statement)
PROGRAM MyProgram !<<<<< 8,16, pass
CALL MySub
CALL MySub
END PROGRAM MyProgram
SUBROUTINE MySub
INTEGER, SAVE :: i
INTEGER, SAVE :: j
INTEGER, SAVE :: k
DATA i,j,k /10, 20, 35/
i = i + 1
j = j + 1
k = k + 1
PRINT *, 'i=', i, 'j=', j, 'k=', k
END SUBROUTINE MySub