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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc3e3a6e4f85e03f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-12 10:33:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: class wide object in generic package Date: 12 Jun 2002 13:33:41 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3D045767.8020102@rcs.ei.tum.de> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1023903654 10577 128.183.220.71 (12 Jun 2002 17:40:54 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 12 Jun 2002 17:40:54 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:25809 Date: 2002-06-12T17:40:54+00:00 List-Id: "Ehud Lamm" 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