with text_io; use text_io; procedure Szem is task type Kiiro is entry Init ( s: in STRING := "" ); end Kiiro; a, b: Kiiro; task Szemafor is entry P; entry V; end Szemafor; task body Szemafor is begin loop accept P; accept V; end loop; end Szemafor; task body Kiiro is type PStr is access STRING; nev: PStr; begin accept Init ( s: in STRING := "" ) do nev := new STRING(1..s'length); nev.all := s; end Init; for i in POSITIVE'range loop Szemafor.P; Put_Line(nev.all & POSITIVE'IMAGE(i)); Szemafor.V; end loop; end Kiiro; begin a.Init("Jancsi"); b.Init("Julcsa"); end Szem;