From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,NICE_REPLY_A,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Manuel Gomez Newsgroups: comp.lang.ada Subject: Re: problemn with string'last Date: Fri, 5 May 2023 18:28:58 +0200 Organization: A noiseless patient Spider Message-ID: References: <2bc1705c-7802-4e89-960f-9b566d376f3cn@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 5 May 2023 16:28:58 -0000 (UTC) Injection-Info: dont-email.me; posting-host="b7dfd34a0abe1f3dde8151dc7187d13f"; logging-data="2548211"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++mFAqe3ewUIXsnAzFI/Vs" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cancel-Lock: sha1:/deN5R0SPFpqKxkok3T2/cwQXVU= In-Reply-To: Content-Language: es-HN Xref: news.eternal-september.org comp.lang.ada:65175 List-Id: El 5/5/23 a las 13:17, Jeffrey R.Carter escribió: > On 2023-05-05 11:51, Daniel Gaudry wrote: >>    Data         : constant String         := "  PLUS_STRING    : >> CONSTANT STRING(1..3) :=(1 =>'" & Double_Quote & "' , 2 =>'+' , 3 =>'" >> & Double_Quote & ");"; > > Wouldn't it be simpler and clearer to write this as > > Data : constant String := "  PLUS_STRING : CONSTANT STRING := " & '"' & > '+' & '"'; > > ? Note also that you seem to be missing an apostrophe (''') before the > right parenthesis if you intend Data to be a valid Ada declaration. > Or like this (doubling the quotes, which is the way to _escape_ the double quote inside Ada strings): Data : constant String := " PLUS_STRING : CONSTANT STRING(1..3) :=(1 =>'""' , 2 =>'+' , 3 =>'""');";