Understanding this Pascal-FC threaded code

Posted by dmindreader on Stack Overflow See other posts from Stack Overflow or by dmindreader
Published on 2010-05-10T16:49:06Z Indexed on 2010/05/10 16:54 UTC
Read the original article Hit count: 389

Filed under:
|
|
|
**Program Parcial2;
type buffer = channel of integer;
var buffers : array [1..2] of buffer;
  val:integer;

process sleeper (id:integer);
var i : integer;
begin 
   for i:=1 to 10 do
   begin
     sleep (random(10*id));
     **buffers (id):any;**
   end;
end;

process troll;
begin
  **buffers[1]: random(10);**
end;**

What are buffers(id):any and buffers[1]:random(10) doing?

© Stack Overflow or respective owner

Related posts about pascal-fc

Related posts about pascal