with text_io; use text_io; procedure kocsma is type Ital is (sor, bor, palesz); task kocsmaros is entry tolt(mit:ital); end kocsmaros; task body kocsmaros is begin for i in 1..20 loop accept tolt (mit: ital) do put_line ("toltok egy kis"&ital'image (mit) &"-t"); case mit is when palesz => delay 0.3; when bor => delay 0.5; when sor => delay 1.0; end case; end tolt; end loop; end kocsmaros; task type reszeg; task body reszeg is sorrivas_ideje: duration := 0.2; begin kocsmaros.tolt(palesz); put_line("benyomok egy felest!"); delay 0.1; kocsmaros.tolt(bor); put_line("macifroccs!"); delay 0.2; loop kocsmaros.tolt(sor); put_line("sorocske"); delay sorrivas_ideje; sorrivas_ideje := sorrivas_ideje * 2; end loop; end reszeg; type reszeg_access is access reszeg; r:reszeg_access; begin put_line("nyit a kocsma"); for i in 1..5 loop delay 3.0; put_line("erre jar egy vendeg"); r:=new reszeg; end loop; end kocsma;