SUBROUTINE sub(x) INTEGER,INTENT(INOUT) :: x INTEGER,SAVE :: count=0 count=count+1 IF (count < 4) x=x+10 END SUBROUTINE sub