From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f2f0fba4aa9a6bca X-Google-Attributes: gid103376,public From: "Weston T. Pan" Subject: Re: Having a problem with private extension and discriminants... Date: 1999/07/22 Message-ID: <3797015F.60F423F1@usc.edu>#1/1 X-Deja-AN: 503970394 Content-Transfer-Encoding: 7bit References: <7n662e$gu7$1@aludra.usc.edu> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: University of Southern California, Los Angeles, CA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-07-22T00:00:00+00:00 List-Id: Florian Weimer wrote: > Perhaps this is a solution: > > package P1.C1 is > > type C (Foo : Natural) is new A with private; > > private > type C (Foo : Natural) is new B (Foo) with > record > -- more fields in addition to B's > end record; > > end P1.C1; Hi, I thought about doing that, but I wanted to see if it was possible to not give any indication that something else was being done in the private section. For example, in the case where there is no discriminants, a person can do the following: package P1 is type A is abstract tagged with null record; private type B is abstract new A with record -- blah blah end record; end P1; package P1.C1 is type C is new A with private; private type C is new B with record -- blah end record; end P1.C1; In the above there is no indication in the public part that there is something else happening in the private section. Oh well, I guess I will just add the discriminant to C. I prefer doing that than making the type B into a record and having C contain a field of type B. Thank you for your suggestion. --Weston