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 >
Wrap
Text File
|
1993-03-23
|
676b
|
27 lines
program move
real hb(10), a(5,5), b(10)
cmf$ layout hb(:host)
integer i
b = 0
c 0 0 0 0 0 0 0 0 0 0
forall (j=1:5, i=1:5) a(i,j) = i + j
c 2 3 4 5 6
c 3 4 5 6 7
c 4 5 6 7 8
c 5 6 7 8 9
c 6 7 8 9 10
b(2:6) = a (3,1:5)
b(6:8) = a (3:5,4)
c 0 4 5 6 7 7 8 9 0 0
hb = b
print 5, hb
print *, ' '
print *, ' a(5,5) = i+j, b(10) = 0'
print *, ' b(2:6) = a(3,1:5), b(6:8) = a(3:5,4)'
print *, ' '
print *, 'Results should be '
print *, ' 0 4 5 6 7'
print *, ' 7 8 9 0 0'
5 FORMAT (5F10.5)
end