Added a couple of testcase programs for reading from the keyboard and echoing
This commit is contained in:
parent
986a4acb2b
commit
2107960442
8
testcases/echo.occ
Normal file
8
testcases/echo.occ
Normal file
|
@ -0,0 +1,8 @@
|
|||
PROC echo(CHAN BYTE in, out)
|
||||
BYTE c:
|
||||
WHILE TRUE
|
||||
SEQ
|
||||
in ? c
|
||||
out ! c
|
||||
out ! c
|
||||
:
|
11
testcases/echoquit.rain
Normal file
11
testcases/echoquit.rain
Normal file
|
@ -0,0 +1,11 @@
|
|||
process main(?uint8: in, !uint8: out, !uint8: err)
|
||||
{
|
||||
uint8: c;
|
||||
in ? c;
|
||||
while (c <> 'q')
|
||||
{
|
||||
out ! c;
|
||||
out ! c;
|
||||
in ? c;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user