Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.96 KB | None | 0 0
  1. Put_Line("Zaczeto producenta wyrobu " & Nazwa_Wyrobu(Nr_Typu_Wyrobu));
  2.       loop
  3.      delay 3.0 ;--  symuluj produkcje
  4.      Put_Line("Wyprodukowano wyrob " & Nazwa_Wyrobu(Nr_Typu_Wyrobu)
  5.             & " numer "  & Integer'Image(Numer_Wyrobu));
  6.          -- Wstaw do magazynu
  7.          loop
  8.             select
  9.                B.Przyjmij(Nr_Typu_Wyrobu, Numer_Wyrobu, Przyjeto);
  10.                if(Przyjeto = True) then
  11.                   Numer_Wyrobu := Numer_Wyrobu + 1;
  12.                   exit;
  13.                else
  14.                   Put_Line("Aktualnie nie ma miejsca na "
  15.                            & Nazwa_Wyrobu(Nr_Typu_Wyrobu) & " numer "
  16.                            & Integer'Image(Numer_Wyrobu) & " musi zaczekac.");
  17.                   delay 5.0;
  18.                end if;
  19.             else
  20.                Put_Line(Nazwa_Wyrobu(Nr_Typu_Wyrobu)
  21.             & " numer "  & Integer'Image(Numer_Wyrobu) & " musi zaczekac.");
  22.             end select;
  23.          end loop;
  24.       end loop;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement