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: a07f3367d7,366b213c4abb1039 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!nntp.ilk.net!not-for-mail From: Markus Schoepflin Newsgroups: comp.lang.ada Subject: Re: What makes a procedure call 'dispatching' in Ada? Date: Fri, 20 Nov 2009 14:58:57 +0100 Organization: Customer of ILK Internet GmbH, Karlsruhe, Germany Message-ID: References: NNTP-Posting-Host: csdc.comsoft.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: nntp.ilk.net 1258725538 17641 212.86.205.70 (20 Nov 2009 13:58:58 GMT) X-Complaints-To: usenet@ilk.net NNTP-Posting-Date: Fri, 20 Nov 2009 13:58:58 +0000 (UTC) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:8171 X-Original-Bytes: 1889 Date: 2009-11-20T14:58:57+01:00 List-Id: Markus Schoepflin wrote: > Dmitry A. Kazakov wrote: > > [...] > > Thanks for you swift and helpful reply. > >> If P is to be defined in terms of any type from the class FOO, then P has >> to be declared differently (class-wide): > > So If I understand this correctly, if I want dispatching to happen on a > given type, I always need to use the class type? > And one more question, can I have a dispatching procedure that doesn't explicitly use the type it dispatches on? In C++, that would read: class foo { virtual void f() = 0; }; class bar { void f() { // Do something just depending on class type bar, // not on an object of the class, so the 'this' pointer // actually is never used. } }; Markus