garlic_6.0.1_90ef4b6f/Examples/Self/etypes.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
with Ada.Text_IO;
with Ada.Integer_Text_IO;

package body Etypes is

   procedure Print (N : access New_Node_Type) is
   begin
      Ada.Text_IO.Put ("Data : ");
      Ada.Integer_Text_IO.Put (N.Data);
      Ada.Text_IO.New_Line;
   end Print;

   Local : New_Node_Type;

begin

   Local.Data := 1996;
   Register (Ptypes.Node_Access (Local.My.Self));

end Etypes;