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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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 Path: g2news1.google.com!postnews.google.com!e31g2000vbm.googlegroups.com!not-for-mail From: "RasikaSrinivasan@gmail.com" Newsgroups: comp.lang.ada Subject: Re: What makes a procedure call 'dispatching' in Ada? Date: Fri, 20 Nov 2009 05:54:34 -0800 (PST) Organization: http://groups.google.com Message-ID: <791ba197-13ce-4c6f-9d6f-7daa47bf69e1@e31g2000vbm.googlegroups.com> References: NNTP-Posting-Host: 98.216.109.119 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1258725274 31386 127.0.0.1 (20 Nov 2009 13:54:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 20 Nov 2009 13:54:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e31g2000vbm.googlegroups.com; posting-host=98.216.109.119; posting-account=mZyFSQoAAABfOmklsh1d8TPbS2LncUKl User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8169 Date: 2009-11-20T05:54:34-08:00 List-Id: On Nov 20, 8:43=A0am, 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 h= as > > 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? > > Regards, > Markus I dont know if the following will clarify or muddle but still here it goes : In your original case, the procedure P was defined only for FOO for which there is no A defined. On the other hand in Dmitry's modification P is defined for the whole family rooted in FOO ie FOO'Class. So A becomes dispatching. I think there is nothing wrong with the declaration of A and nothing for the compiler to complain about. HTH. regards, srini