... forall is a fortran 95 statement ...
FORALL (i=1:n, j=1:m, a(i,j) /= 0.0 )
a(i,j) = 1.0 / a(i,j)
END FORALL
... is equivalent to ...
DO i = 1, n
DO j = 1,m
IF ( a(i,j) /= 0) THEN
a(i,j) = 1.0 / a(i,j)
ENDIF
ENDDO
ENDDO
... the order of executing the statements...