From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: class wide object in generic package
Date: 12 Jun 2002 13:33:41 -0400
Date: 2002-06-12T17:40:54+00:00 [thread overview]
Message-ID: <ubsagmmfe.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: ae5kus$381$1@news.iucc.ac.il
"Ehud Lamm" <mslamm@huji.ac.il> writes:
> It seems to me you want as a generic paramter any type that has the Eval
> operation.
> So you can define a parent type having this operation (say an abstract type
> called Evalable).
> Now you can define the generic
>
> with Evalable_Pak;
> generic
> type My_Evalable is new Evalable_Pak.Evalable with private;
> ....
>
> My_Evalable will have a primitive Eval operation.
Yes, it will have an Eval operation, but that operation will _not_ be
visible in the generic body. The generic body does _not_ "read" the
package spec for Evalable_Pak.
That's why you need the generic formal package parameter; then the
generic body _does_ see everything in the generic formal package spec.
> (Hope I am not making a fool of myself here.
Asking real questions is always ok.
> I confess not compiling a real example.)
That would have been a good idea :).
--
-- Stephe
next prev parent reply other threads:[~2002-06-12 17:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-10 7:38 class wide object in generic package Thomas Maier-Komor
2002-06-10 12:28 ` Craig Carey
2002-06-10 13:14 ` Thomas Maier-Komor
2002-06-10 13:00 ` Stephen Leake
2002-06-10 13:25 ` Thomas Maier-Komor
2002-06-11 20:57 ` Ehud Lamm
2002-06-12 17:33 ` Stephen Leake [this message]
2002-06-13 1:58 ` Robert A Duff
2002-06-13 14:07 ` Stephen Leake
-- strict thread matches above, loose matches on Subject: below --
2002-06-10 11:07 Grein, Christoph
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox