From: "Weston T. Pan" <westonpa@usc.edu>
Subject: Re: Having a problem with private extension and discriminants...
Date: 1999/07/22
Date: 1999-07-22T00:00:00+00:00 [thread overview]
Message-ID: <3797015F.60F423F1@usc.edu> (raw)
In-Reply-To: m3so6hnmxw.fsf@deneb.cygnus.stuttgart.netsurf.de
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
prev parent reply other threads:[~1999-07-22 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-21 0:00 Having a problem with private extension and discriminants westonpa
1999-07-22 0:00 ` Florian Weimer
1999-07-22 0:00 ` Weston T. Pan [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox