Code:
double precision maxstress(w)
real, dimension(:), allocatable, save :: han(w)
integer jang(w)
do i=1,nblock
if(maxstress(i) . gt. 1000) then
jang(i) =1
han(i) = han(i) + 1
else
jang(i) =0
endif
write(*,*) "jang", i, jang(i)
write(*,*) "han", i, han(i)
enddo
gives error message:
findnode2.for(47): error #6646: ALLOCATABLE or POINTER attribute dictates a deferred-shape-array [HAN]
real, dimension(:), allocatable, save :: han(w)
-----------------------------------------------^
From this code I need to make static variable han
but the error #6646 occurs.
What do I need to do?