      PROGRAM ARRAY01
c     array assignments
CHPF$ PROCESSORS P(4)
      REAL, DIMENSION(100) :: A,B
      REAL B1,B2,B3,B4
      INTEGER I,J
CHPF$ TEMPLATE FRED(100)
CHPF$ DISTRIBUTE FRED(BLOCK)     
CHPF$ ALIGN A(:) WITH FRED(:)
CHPF$ ALIGN B(:) WITH FRED(:)

      I=1
      J=100

      A = 100
      B = 5.5
      B(I:J-1) = A(I:J-1)

      WRITE(6,*) '======= ARRAY ASSIGNMENT ======'
      WRITE(6,*) 'A=100'
      WRITE(6,*) 'B=5.5'
      WRITE(6,*) 'B(I:J-1) = A(I:J-1)'
      WRITE(6,*) '-------------------------------'
      WRITE(6,*) '1-d template distributed BLOCK '
      WRITE(6,*) '===============================' 


      B1=B(1)
      B2=B(10)
      B3=B(99)
      B4=B(100)


      WRITE(6,*) B1, '--> should be 100'
      WRITE(6,*) B2, '--> should be 100'
      WRITE(6,*) B3, '--> should be 100'
      WRITE(6,*) B4, '--> should be 5.5'

      STOP
      END

