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

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