! Collection of code snippets by Arne Vajhøj 
! (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
program wherestmt
    integer i, j
    integer, dimension(3,3) :: a, b
    do i = 1,3
        do j =1,3
            a(i,j) = i + j - 1
        end do
    end do
    do i = 1,3
        write(*,*) (a(i,j), j=1,3)
    end do
    b = a * a
    do i = 1,3
        write(*,*) (b(i,j), j=1,3)
    end do
    where (a > 3)
        a = 0
    end where
    do i = 1,3
        write(*,*) (a(i,j), j=1,3)
    end do
    where (a == 0)
        b = 1
    end where
    do i = 1,3
        write(*,*) (b(i,j), j=1,3)
    end do
end program wherestmt
