Anonymous user
Synchronous concurrency: Difference between revisions
m
→{{header|ALGOL 68}}
Line 79:
STRING line;
INT count := 0, errno;
BOOL
SEMA output throttle = LEVEL 0, input throttle = LEVEL 1;
FILE input txt;
errno := open(input txt, "input.txt", stand in channel);
PROC call back done = (REF FILE f) BOOL: (
on logical file end(input txt, call back done);
PAR (
WHILE
Line 93:
get(input txt,(line, new line));
UP output throttle;
NOT
DO
count+:=1
Line 100:
WHILE
DOWN output throttle;
NOT
DO
print((line, new line));
|