	PROGRAM main
	 IMPLICIT NONE

	 REAL, DIMENSION(2,2) :: A 
	 REAL, DIMENSION(2,2) :: B

	 A(1,1) = 1; A(1,2) = 2; A(2,1) = 3; A(2,2) = 4; 
	 B(1,1) = 4; B(1,2) = 1; B(2,1) = 7; B(2,2) = 1; 

	 print *, "Initially:"
	 print *
	 print *, "A:"
	 print *, A(1,1), "  ", A(1,2)  
	 print *, A(2,1), "  ", A(2,2)
	 print *, "B:"
	 print *, B(1,1), "  ", B(1,2)  
	 print *, B(2,1), "  ", B(2,2)

 	 WHERE  (A > B)                     
           A = 1
           B = 0
         ELSEWHERE
           B = 1
           A = 0
         END WHERE

	 print *, "After WHERE (B > A):"
	 print *
	 print *, "A:"
	 print *, A(1,1), "  ", A(1,2)  
	 print *, A(2,1), "  ", A(2,2)
	 print *, "B:"
	 print *, B(1,1), "  ", B(1,2)  
	 print *, B(2,1), "  ", B(2,2)

	
	END
