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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: 'Image Date: Wed, 19 Nov 2014 15:21:19 +0100 Organization: A noiseless patient Spider Message-ID: References: <54609F34.4080201@spam.spam> <35f01472-3510-4f67-8765-006fa8591c35@googlegroups.com> <9tc8w.73007$ZT5.37595@fx07.iad> <22a3816a-4e89-48f0-a126-dce581781beb@googlegroups.com> <084b1934-9641-425e-85ec-293e0334413e@googlegroups.com> <86bf69c8-eb08-4696-b6c9-3784f5c42213@googlegroups.com> <87389olqie.fsf@ixod.org> <19fa65d4-72c9-44ab-b44b-4ea0929c18f2@googlegroups.com> <87a93s8j4m.fsf@mid.deneb.enyo.de> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 19 Nov 2014 14:21:04 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="2396"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tEt+mK8HkiHTO2c5XQQJfGQoCI2uNoLk=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Cancel-Lock: sha1:4Gs6O1P9atH9n+orULKbdW27aHM= Xref: number.nntp.giganews.com comp.lang.ada:190858 Date: 2014-11-19T15:21:19+01:00 List-Id: On 19.11.14 14:46, Brian Drummond wrote: > -------------------------------------------------------- > with Ada.Text_IO; > > procedure foo is > function "&" (l: string; r: natural) return string is > begin > return l & character'VAL(r); > end "&"; > > a: constant string := "abcd"; > b: constant string := "efgh"; > begin > Ada.Text_IO.put_line( "concatenated string is " & a & -- Line 18 > character'VAL(16#42#) & b & > " " & a & 16#42# & b ); > end foo; > -------------------------------------------------------- This is from GNAT's Spitbol support package: function "&" (Num : Integer; Str : String) return String; function "&" (Str : String; Num : Integer) return String; function "&" (Num : Integer; Str : VString) return VString; function "&" (Str : VString; Num : Integer) return VString; -- In all these concatenation operations, the integer is converted to -- its corresponding decimal string form, with no leading blank.