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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,f857f366542cd8aa X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder.news-service.com!news.k-dsl.de!news.uni-stuttgart.de!news.belwue.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Dispatch on the result still does not work? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <3a2a94a3-91df-411e-b078-498cc7850554@18g2000yqa.googlegroups.com> Date: Sat, 11 Jul 2009 14:20:40 +0200 Message-ID: NNTP-Posting-Date: 11 Jul 2009 14:20:34 CEST NNTP-Posting-Host: 5cbb8bb6.newsspool3.arcor-online.net X-Trace: DXC=6:eAiMb8G On Sat, 11 Jul 2009 04:32:49 -0700 (PDT), Hibou57 (Yannick Duch�ne) wrote: > There is no tagged argument here which controls the dispatching. [...] > My personal opinion is that there is no trouble here, as there is no > tagged type to control the execution. While in the mean time, I > understand what you mean : you are consedering the return value target > as the out parameter of a procedure. But this is not an out parameter > of a procedure, this is a result returned by a function. Yes the tagged "parameter" in this case is the result X, the target. Conceptually there is no any difference between parameters and results of a subprogram (I leave subtle issues about object constraints, which are irrelevant here). Since the target is class-wide of the type T'Class with the actual tag of S'Tag, the call to Value should be considered dispatching, and resolved to S'(Value). Unfortunately it is still not. In Ada 95 it didn't work either. I don't know if there is an AI to fix this problem, or it is still considered "right" thing. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de