home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
adaptor.zip
/
adapt.zip
/
adaptor
/
examples
/
dalib
/
generic
/
hostsend.f
next >
Wrap
Text File
|
1993-04-28
|
516b
|
25 lines
program hostsend
c Note: This program should only demonstrate the functionality, but
c it is a very inefficient program
parameter (N=100)
real ha (N), a(N), s
cmf$ layout ha(:host)
c this loop is only executed by the host
do i = 1, N
ha(i) = i
end do
do i = 1, N
x = ha(i) ! host_send, host_recv
a(i) = x ! have_i_value
end do
s = sum (a)
print *, 'Result is ', s, ' should be ', N * (N+1) / 2
end