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-Thread: 103376,8047848c4805a99e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: matthias_k Newsgroups: comp.lang.ada Subject: Re: Classwide Parameter? Date: Tue, 12 Oct 2004 10:01:34 +0200 Organization: T-Online Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 1097568067 00 13693 7lkoX3o1+coGSpz3 041012 08:01:07 X-Complaints-To: usenet-abuse@t-online.de X-ID: Eee9goZHretB+WGjs37yk89FqJw5e7Pe01Ogy4hs7QFjPuu7dkr68V User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:5073 Date: 2004-10-12T10:01:34+02:00 List-Id: Matthew Heaney wrote: > matthias_k writes: > > >>Thanks for that answer. However, I'm still having problems (I have >>rewritten the code to be in one single package now): >> >> >>package Graphics is >> >> type Shape is abstract tagged null record; >> procedure Draw (Obj: Shape'Class); > > > Get rid of this operation. It's a "class-wide" operation (like a static > method in C++), and hence the operation isn't primitive for the type > (and therefore doesn't dispatch). > > Oha? I thought it would be analogous to 'virtual' in C++, not static. If I leave out the method completely, then this is not what I know as 'Inheritance' anymore. Shape is supposed to be an abstract base class, which -declares- (not necessarily -defines-) a common interface for its subtypes. The code I posted may not reflect this too well, it's just samplecode. I doubt -any- dynamic binding will happen when completely leaving out Shape's Draw method. And btw.: What does dispatch mean? :) Is that the Ada term for dynamic binding? - Matthias