home *** CD-ROM | disk | FTP | other *** search
/ cs.rhul.ac.uk / www.cs.rhul.ac.uk.zip / www.cs.rhul.ac.uk / pub / CS375 / gardens1.pfc < prev    next >
Text File  |  1999-01-11  |  462b  |  38 lines

  1. program gardens1;
  2.  
  3. (* first attempt to solve the
  4.    ornamental gardens problem *)
  5.  
  6. var 
  7.   count: integer;
  8.  
  9. process turnstile1;
  10.  
  11. var 
  12.   loop: integer;
  13. begin
  14.   for loop := 1 to 20 do
  15.     count := count + 1
  16. end;  (* turnstile1 *)
  17.  
  18.  
  19. process turnstile2;
  20.  
  21. var
  22.   loop: integer;
  23. begin
  24.   for loop := 1 to 20 do
  25.     count := count + 1
  26. end;  (* turnstile2 *)
  27.  
  28.  
  29. begin
  30.   count := 0;
  31.   cobegin
  32.     turnstile1;
  33.     turnstile2
  34.   coend;
  35.   writeln('Total admitted: ',count)
  36. end.
  37.  
  38.