comp.lang.ada
 help / color / mirror / Atom feed
From: "Papastefanos Serafeim" <serafeim@otenet.gr>
Subject: Re: Problems with tagged records and inheritance
Date: Fri, 11 Jul 2003 14:49:08 +0300
Date: 2003-07-11T14:49:08+03:00	[thread overview]
Message-ID: <ben67t$60c$1@ulysses.noc.ntua.gr> (raw)
In-Reply-To: bekkpr$12eg$1@ulysses.noc.ntua.gr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

I got it, thanks for the answers...

� Papastefanos Serafeim ������ ��� ������ ...
>I have using a base type like this:
>...
>type Base is tagged private;
>...
>type Base is tagged record
>         AAA: Integer:=1;
>      end record;
>
>and a child type like this
>
>type Child is new Base with private;
>....
>type Child is new Base with record
>        BBB: Integer:=5;
>      end record;
>
>The problem is that the following is not working:
>
>   procedure Test(Ch: in Child) is
>   begin
>      Put(Ch.AAA); --<- This line has an error, it says no selector AAA for
>type Child
>      Put(Ch.BBB);
>   end Test;
>The procedure Test is declared in the same package
>as the type Child and defined at the package's Body.
>
>The error is becouse AAA is not part of Child.
>Why is that ? I thought that Child would contain
>AAA and BBB, and not only BBB...
>
>--
>Papastefanos Serafeim
>serafeim@otenet.gr
>
>





  parent reply	other threads:[~2003-07-11 11:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-10 20:56 Problems with tagged records and inheritance Papastefanos Serafeim
2003-07-10 22:15 ` Re; " tmoran
2003-07-10 22:24 ` Robert I. Eachus
2003-07-10 22:29 ` Ludovic Brenta
2003-07-11 11:56   ` Marin David Condic
2003-07-11 11:49 ` Papastefanos Serafeim [this message]
2003-07-15  1:34 ` Richard Riehle
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox