public
/
Ack-5.5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Pristine Ack-5.5
[Ack-5.5.git]
/
lang
/
occam
/
test
/
aatob.ocm
1
def otherwise=true:
2
3
proc xxtoy(chan in, out, value x, y)=
4
var c:
5
seq
6
c:= not EOF
7
while c<>EOF
8
seq
9
in ? c
10
if
11
c=x
12
seq
13
in ? c
14
if
15
c=x
16
out ! y
17
otherwise
18
out ! x; c
19
otherwise
20
out ! c
21
:
22
chan link:
23
par
24
xxtoy(input, link, 'a', 'b')
25
xxtoy(link, output, 'b', 'c')