Commit | Line | Data |
---|---|---|
e2882c85 | 1 | -- Copyright 2017-2018 Free Software Foundation, Inc. |
828d5846 XR |
2 | -- |
3 | -- This program is free software; you can redistribute it and/or modify | |
4 | -- it under the terms of the GNU General Public License as published by | |
5 | -- the Free Software Foundation; either version 3 of the License, or | |
6 | -- (at your option) any later version. | |
7 | -- | |
8 | -- This program is distributed in the hope that it will be useful, | |
9 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | -- GNU General Public License for more details. | |
12 | -- | |
13 | -- You should have received a copy of the GNU General Public License | |
14 | -- along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | ||
16 | with System; | |
17 | ||
18 | package Pck is | |
19 | ||
20 | package Top is | |
21 | type Top_T is tagged private; | |
22 | type Top_A is access Top_T'Class; | |
23 | procedure Assign (Obj: in out Top_T; TV : Integer); | |
24 | private | |
25 | type Top_T is tagged record | |
26 | N : Integer := 1; | |
27 | A : Integer := 48; | |
28 | end record; | |
29 | end Top; | |
30 | ||
31 | package Middle is | |
32 | type Middle_T is new Top.Top_T with private; | |
33 | type Middle_A is access Middle_T'Class; | |
34 | procedure Assign (Obj: in out Middle_T; MV : Character); | |
35 | private | |
36 | type Middle_T is new Top.Top_T with record | |
37 | N : Character := 'a'; | |
38 | end record; | |
39 | end Middle; | |
40 | ||
41 | type Bottom_T is new Middle.Middle_T with record | |
42 | N : Float := 4.0; | |
43 | X : Integer := 6; | |
44 | A : Character := 'J'; | |
45 | end record; | |
46 | type Bottom_A is access Bottom_T'Class; | |
47 | procedure Assign (Obj: in out Bottom_T; BV : Float); | |
48 | ||
49 | procedure Do_Nothing (A : System.Address); | |
50 | ||
51 | end Pck; |