Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. with Ada.Text_IO;
  2. use Ada.Text_IO;
  3.  
  4. package body buforw is
  5.  
  6. protected body BufW is
  7. entry Wstaw(Ch: in Typ_El)
  8. when (IxWst mod 10) /= (IxPob mod 10) is
  9. begin
  10. Bufo(IxWst mod 10) := Ch;
  11. IxWst := IxWst+1;
  12. end Wstaw;
  13.  
  14. entry Pobierz(Ch: out Typ_El)
  15. when (IxPob+1 < IxWst) is
  16. begin
  17. Ch := Bufo(IxPob+1 mod 10);
  18. IxPob := IxPob+1;
  19. end Pobierz;
  20. end BufW;
  21.  
  22. end buforW;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement