evanescente-ondine

essai.adb

May 13th, 2026
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.99 KB | Source Code | 0 0
  1. pragma Ada_2022;
  2. with tuppleSpacePackage.RealTupples, Ada.Strings.Unbounded, Ada.Text_IO;
  3. use tuppleSpacePackage.RealTupples,
  4. tuppleSpacePackage, Ada.Strings.Unbounded, Ada.Text_IO;
  5. procedure Essai is
  6.     A, B: Unbounded_String;
  7.     T: String_String_Tupple;
  8.     Z: Integer_Positive_String_Tupple;
  9.     I: Integer;
  10.     P: Positive;
  11.     F: Unbounded_String;
  12.     Space: RealTuppleSpace;
  13. begin
  14.     Space.Out_Operation (Encode("111", "111"));
  15.     Space.Out_Operation (Encode(-3,4, "Text"));
  16.     Space.In_Operation (T);
  17.     Put_line(To_String(T.A) & " " & To_string(T.B));
  18.     begin
  19.         Space.INP_Operation (T);
  20.     exception when E: No_Immediate_Message =>
  21.         Put_line ("Caught");
  22.     end;
  23.     begin
  24.         Space.RDP_Operation (T);
  25.     exception when E: No_Immediate_Message =>
  26.         Put_line ("Caught");
  27.     end;
  28.     Space.In_Operation (Z);
  29.     Put_line(Z'Image);
  30.     Space.Out_Operation (Encode ("222", "222"));
  31.     Space.Out_Operation (Encode ("aaa", "aaa"));
  32.     Space.In_Operation (T);
  33.     Put_line(T'Image);
  34.     Space.In_Operation (T);
  35.     Put_line(T'Image);
  36. end Essai;
Advertisement
Add Comment
Please, Sign In to add comment