
      program tv
c
      parameter(id1=2,id2=3,id3=4)
      dimension ad(id1,id2,id3)
      pointer(pa,a(1))
c
      call hpalloc(pa,id1*id2*id3,ier,1)
      do i=1,id1*id2*id3 
        a(i) = float(i)
      enddo
      write(6,"('a=',/(10f6.2))") (a(i),i=1,id1*id2*id3)
      ii = 0
      do i3=1,id3
        do i1 = 1,id1
          do i2=1,id2
            ii = ii+1
            ad(i1,i2,i3) = float(ii)
            ix = (i3-1)*id3 + (i2-1)*id2 + (i1-1)*id1 + i2
            a(ix) = 0.
          enddo
        enddo
      enddo
      write(6,"('ad=',/(10f6.2))") ad
      do i1=1,i1
        do i3=1,i3 
          ad(i1,:,i3) = 0.
        enddo
      enddo
      write(6,"('a=',/(10f6.2))") (a(i),i=1,id1*id2*id3)
      write(6,"('ad=',/(10f6.2))") ad
      call hpdeallc(pa,ier,1)
      stop
      end
