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,UTF8 Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!uucp.gnuu.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="utf-8" 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 17:19:16 +0200 Message-ID: <7tu7wng4vxn6.nhbegffx941o$.dlg@40tude.net> NNTP-Posting-Date: 11 Jul 2009 17:19:10 CEST NNTP-Posting-Host: 3778c598.newsspool1.arcor-online.net X-Trace: DXC=4nboO[k>^:ZU6b:FjPaGjQic==]BZ:af^4Fo<]lROoRQ^YC2XCjHcbY?@AV>hR\\>ZDNcfSJ;bb[UIRnRBaCd On Sat, 11 Jul 2009 06:36:48 -0700 (PDT), Hibou57 (Yannick Duchêne) wrote: > On 11 juil, 14:20, "Dmitry A. Kazakov" > wrote: >> Conceptually there is no any difference between parameters and results of a >> subprogram > > IMHO, there is a difference. A result is something created, not > something assigned to. > > Until the function creates the return value, the return value does not > exist. (You mean here "the return object". The value has existed and continues to exist. Value is a property of the type, e.g. 123 exists even if you don't have any Integer variable holding it.) > Now, what if the function is invoked for a formal parameter which is, > let say “ Parameter : T'Class ” ? The actual object is converted to T'Class (per view conversion). This is a different case,... or not. All depends on how to treat the assignment statement. > Conceptually, returning a result from a function, is not an > assignment, this is.... just returning a result from a function. If it > later turns into an assignment, this is a matter of the usage of the > function, not a matter of the work of the function. As a proof, this > happens only later, after the function was invoked, and more than > that, the result may not be assigned to any variable. Well, I used to think the way like you do until Ada 2005 introduced limited aggregates and initialization of limited objects and their components using functions... (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de