libgpr2_24.0.0_eda3c693/testsuite/tests/gprls/closure/sal/indash.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
with Ada.Text_IO;       use Ada.Text_IO;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;

package body InDash is

   -------------
   -- Display --
   -------------

   procedure Display (This : access Instrument) is
   begin
      New_Line;
      Put (Head (To_String (This.Name), 13));
      Put (" : ");
   end Display;

   ----------
   -- Name --
   ----------

   function Name (This : access Instrument) return String is
   begin
      return To_String (This.Name);
   end Name;

   --------------
   -- Set_Name --
   --------------

   procedure Set_Name (This : access Instrument; To : String) is
   begin
      This.Name := To_Unbounded_String (To);
   end Set_Name;

end InDash;