コード:
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
エラーメッセージが表示されます:
findnode2.for(47): error #6646: ALLOCATABLE or POINTER attribute dictates a deferred-shape-array [HAN]
real, dimension(:), allocatable, save :: han(w)
-----------------------------------------------^
このコードから静的変数を作成する必要がありますhan
が、エラー #6646 が発生します。
私は何をする必要がありますか?