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,19b8909eebb73a8e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Question on Controlled types 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: <4a211b98$0$2862$ba620e4c@news.skynet.be> <1m6a6s5xq3hrf.1i7zbi65wq3cd$.dlg@40tude.net> <2f907a62-5ce3-41bc-816b-9efdaf8f2982@h2g2000yqg.googlegroups.com> <1oa4b8avzgtos.3ofldt4u0hnh.dlg@40tude.net> <8e08ed69-e0fb-4584-aa0f-521d472541bf@v4g2000vba.googlegroups.com> Date: Thu, 4 Jun 2009 17:03:16 +0200 Message-ID: NNTP-Posting-Date: 04 Jun 2009 17:03:16 CEST NNTP-Posting-Host: c9d6e713.newsspool1.arcor-online.net X-Trace: DXC=Y>Sd8gQQ8g8gP]QSEBQ^d4ic==]BZ:af>4Fo<]lROoR1^YC2XCjHcb9UD^3igdJkg2IaLh@b6a8K2 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6250 Date: 2009-06-04T17:03:16+02:00 List-Id: On Thu, 4 Jun 2009 07:34:43 -0700 (PDT), Hibou57 (Yannick Duch�ne) wrote: > On 4 juin, 16:04, "Dmitry A. Kazakov" > wrote: >>> So this means that if there was a second assignation of Delay1, >>> Finalize would be invoked before the copy and the Adjust which will >>> follow the copy ? >> >> Yes. > > So this implies that at execution time, distinction can be made > between the first and the next assignement. No, initialization is not an assignment. This difference was subtle in Ada 95, but in Ada 2005 is more obvious. Consider a limited type T and the function Create that "returns" T: X : T := Create; -- This is OK, because it is an initialization begin X := Create; -- This is illegal, because it would be an assignment Further within Create: function Create return T is begin return X : T [do ... end return]; -- This OK end Create; function Create return T is X : T; begin return X; -- This is not OK, because it returns a local -- limited object X, which is semantically equivalent -- to an assignment end Create; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de