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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,dc1fff2721602dfa X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.17.140 with SMTP id s12mr2894296qaa.3.1359564752596; Wed, 30 Jan 2013 08:52:32 -0800 (PST) X-Received: by 10.49.1.43 with SMTP id 11mr526865qej.29.1359564752490; Wed, 30 Jan 2013 08:52:32 -0800 (PST) Path: k2ni3907qap.0!nntp.google.com!p13no7145386qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 30 Jan 2013 08:52:32 -0800 (PST) In-Reply-To: <86boc63n5d.fsf@gaheris.avalon.lan> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.101.43.210; posting-account=BX0hiQoAAACh1jwwbtKtvsAU1boh6owG NNTP-Posting-Host: 83.101.43.210 References: <4978d638-a04b-4561-85e9-cf6620265af2@googlegroups.com> <86boc63n5d.fsf@gaheris.avalon.lan> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada and string literals From: codeallergy Injection-Date: Wed, 30 Jan 2013 16:52:32 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-01-30T08:52:32-08:00 List-Id: Okay. assuming dat we use GNAT 2012 Literal1 : aliased constant String := "LITERAL"; Literal2 : aliased constant String := "LITERAL"; Literal3 : aliased constant String := "LITERAL"; how the above code is handled ? compiler duplicate the string three times into the data section or the three constants will share the same string or one string into the data section but duplicated at the run time ? another question: how free a object from a procedure ? example: procedure Free_Abc (Target : access String) is begin GNAT.Strings.Free(Target); -- error end Free_Abc; this code produce the error: actual for "X" must be a variable why disallow that ? thanks, Rom B.