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: 103376,bf564bb3bcde0817 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Renaming versus initialisation Date: 27 Sep 2005 20:00:56 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1127865656 23826 192.74.137.71 (28 Sep 2005 00:00:56 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 28 Sep 2005 00:00:56 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:5210 Date: 2005-09-27T20:00:56-04:00 List-Id: Tapio Kelloniemi writes: > V1 : T := F; > V2 : T renames F; > > I'd like to see an explanation of the effect of an object renaming > declaration versus variable declaration and initialisation, when the object > being renamed is a return value of a function. Many thanks for it. They are pretty similar. Differences: V2 is a constant, but V1 is a variable. In Ada 95, V2 works for limited types, but V1 does not. The rules about limited types are relaxed in Ada 2005. - Bob