home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adaptor.zip / adapt.zip / adaptor / examples / dalib / move / simple4.f < prev   
Text File  |  1993-03-23  |  632b  |  28 lines

  1.       program move
  2.       real ha(5,5), a(5,5), b(6)
  3. cmf$  layout ha(:host)
  4.       integer i
  5.       a = 0
  6.       forall (i=1:6) b(i) = i 
  7.       a(1,1:5) = b(2:6)
  8.       a(3,3:5) = b(1:3)
  9.       a(3:5,2) = b(1:3)
  10.       ha = a
  11.       do i = 1, 5
  12.         print 5, ha(i,:)
  13.       end do
  14.       print *, ' '
  15. c      2  3  4  5  6
  16. c      0  0  0  0  0
  17. c      0  1  1  2  3
  18. c      0  2  0  0  0
  19. c      0  3  0  0  0
  20.       print *, 'Results should be '
  21.       print *, '  2  3  4  5  6'
  22.       print *, '  0  0  0  0  0'
  23.       print *, '  0  1  1  2  3'
  24.       print *, '  0  2  0  0  0'
  25.       print *, '  0  3  0  0  0'
  26.   5   FORMAT (5F10.5)
  27.       end
  28.