When I compile the following subroutine, the compiler (/checkmate option) says that 'width_alfa(j)=w1/n' will never be executed, a statement that in fact results false, because it is executed. Is this a bug in the compiler?
subroutine determinar_alfa use mswin use datos_celulas implicit none real8 c,mean_square_h,square_h real8 suma_alturas,w1,w,delta integer4 npt,n,ventana,x_start,x_stop if(allocated(width_alfa)) deallocate(width_alfa) if(allocated(length_alfa)) deallocate(length_alfa) allocate(width_alfa(intervalo),length_alfa(intervalo)) xmax=MAXVAL(matrix%x) xmin=MINVAL(matrix%x) delta=xmax-xmin do j=intervalo,1,-1 square_h=0.0 npt=0 suma_alturas=0.0 w1=0.0 n=0 w=0.0 ventana=INT(delta/j) x_stop=xmin+ventana x_start=xmin do do i=1,pixels_contorno if(matrix(i)%x >= x_start) then write(,) i, matrix(i)%x,matrix(i)%y if(matrix(i)%x>x_stop)exit if(matrix(i)%y==0) stop square_h=square_h+matrix(i)%ymatrix(i)%y suma_alturas=suma_alturas+matrix(i)%y npt=npt+1 endif end do h_mean= suma_alturas/npt mean_square_h=square_h/npt c=mean_square_h-(h_mean*h_mean) w=sqrt(c) w1=w1+w n=n+1 x_start=x_stop x_stop=x_start+ventana if(x_stop>xmax) exit square_h=0.0 suma_alturas=0.0 end do width_alfa(j)=w1/n length_alfa(j)=ventana end do call graficar_alfa(intervalo) end subroutine determinar_alfa
Agustin