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,19b8909eebb73a8e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!g1g2000yqh.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Question on Controlled types Date: Sat, 30 May 2009 06:30:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0311f748-f2a5-40a7-b410-44d547249696@g1g2000yqh.googlegroups.com> References: <4a211b98$0$2862$ba620e4c@news.skynet.be> NNTP-Posting-Host: 91.13.211.208 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1243690253 20021 127.0.0.1 (30 May 2009 13:30:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 30 May 2009 13:30:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g1g2000yqh.googlegroups.com; posting-host=91.13.211.208; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6118 Date: 2009-05-30T06:30:53-07:00 List-Id: Delay_Line is not immutably limited, so the initial value in test1 is not built in place. > =A0 =A0 =A0function Make_Delay_Line(Duration: Duration_Type) return Delay= _Line is > =A0 =A0 =A0 =A0 =A0D: Delay_Line; -- your initialize here > =A0 =A0 =A0begin > =A0 =A0 =A0 =A0 =A0Put_Line("Make_Delay_Line"); > =A0 =A0 =A0 =A0 =A0return D; -- first finalize here for local D --------= ---------------------------- > =A0 =A0 =A0end Make_Delay_Line; > =A0 =A0 =A0Test > procedure test1 is > =A0 =A0 =A0Delay1 : Delay_Line :=3D Make_Delay_Line(Duration =3D> 0.1); = -- no initialize here > begin > =A0 =A0 =A0null; -- second finalize here for Delay1 --------------------= ----------------------- > end test1; > > ------------------------------------- > =A0 =A0 =A0Program output > ------------------------------------- > Initialize Delay_Line > Make_Delay_Line > Adjust Delay_Line > Finalize Delay_Line > Finalize Delay_Line So this is OK