Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. with Ada.Text_IO; use Ada.Text_IO;
  2. with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
  3. with Ada.Sequential_IO;
  4.  
  5. procedure Interest is
  6.  
  7. type Intressen is
  8. array(1..10) of Integer;
  9.  
  10. type Rad_Type is
  11. record
  12. Enamn : string;
  13. Fnamn : String;
  14. Gadress : String;
  15. Padress : String;
  16. Antal_Intressen : Integer;
  17. Intressen : Intressen;
  18. end record;
  19.  
  20. package Rad_IO is
  21. new Ada.Sequential_IO(Rad_Type)
  22. ;
  23. procedure Get_Rel_Ints (Rel_Ints : out Intressen) is
  24. Counter,I : Integer;
  25. Med : Boolean;
  26. begin
  27.  
  28. Counter :=1;
  29. Get(I);
  30. Rel_Ints(1) := I;
  31. while I /= 0 loop
  32. Med := True;
  33. Get(I);
  34. for X in 1..Counter loop
  35. if I = Rel_Ints(X) then
  36. Med := False;
  37. exit;
  38. end if;
  39. end loop;
  40. if Med = True then
  41. Counter := Counter +1;
  42. Rel_Ints(Counter) := I;
  43. if Counter = 10 then
  44. exit;
  45. end if;
  46. end if;
  47. end loop;
  48. end Get_Rel_Ints;
  49.  
  50. Procedure Get_Bin(Fran : in
  51.  
  52.  
  53.  
  54.  
  55.  
  56. begin
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. end Interest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement