Hi all,
I am wondering if anyone can clarify the effect of the SAVE attribute
for global data (i.e. data declared in modules). For example:
program main
use routines, only : routine
call routine()
...
call routine()
end program main
module routines
use shared, only : value
contains
subroutine routine()
write(*,*) value
value=value+1
end subroutine routine
end module routines
module shared
integer, SAVE :: value
end module shared
Does it matter that there is a SAVE on value. If not, when does it
matter.
Thanks a lot,
Aleksandar
--
_____________________________________________
Aleksandar Donev
Physics Department
Michigan State University
East Lansing, MI 48824-1116
E-mail: [log in to unmask]
Work phone: (517) 432-6770
_____________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|