From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a0c:b21e:: with SMTP id x30mr59966405qvd.21.1609418011088; Thu, 31 Dec 2020 04:33:31 -0800 (PST) X-Received: by 2002:a25:3891:: with SMTP id f139mr82283907yba.465.1609418010914; Thu, 31 Dec 2020 04:33:30 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 31 Dec 2020 04:33:30 -0800 (PST) In-Reply-To: <5fedba8b$0$6186$426a74cc@news.free.fr> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2a02:1206:4564:fe50:242a:ea29:1097:e4f2; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 2a02:1206:4564:fe50:242a:ea29:1097:e4f2 References: <5fedba8b$0$6186$426a74cc@news.free.fr> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: renames usage From: Gautier write-only address Injection-Date: Thu, 31 Dec 2020 12:33:31 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:60987 List-Id: > Tag : String renames Elements.Get_Tag_Name (Child); > > Is it equivalent to the following line ? > > Tag : String := Elements.Get_Tag_Name (Child); Since the temporary object containing the result of the call "Elements.Get_Tag_Name (Child)" is not accessible anywhere else, the effect is the same. But, perhaps in some implementations, the "renames" accesses that temporary object, which means the memory containing it must not be freed until Tag is out of scope. Perhaps it is even required. Any compiler specialist here?