      program test
 
      integer k
      parameter (k = 3)

      logical a(k)

      a(1) = .true.
      a(2) = .false.
      a(3) = .true.

      call alltest (a, k, .false.)
      call anytest (a, k, .true.)
      call paritytest (a, k, .false.)

      end

      subroutine alltest (a, N, result)
      logical a(n), s, result

      s = all (a)
      print *, 'ALL: Result is ', s, ' should be ', result

      end

      subroutine anytest (a, N, result)
      logical a(n), s, result

      s = any (a)
      print *, 'ANY: Result is ', s, ' should be ', result

      end

      subroutine paritytest (a, N, result)
      logical a(n), s, result

      s = parity (a)
      print *, 'PARITY: Result is ', s, ' should be ', result

      end
