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,782d6c8a12248b09 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 01 Oct 2008 11:48:34 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Recursion with strings References: <8e3685ad-8a71-4912-a86d-746076215606@64g2000hsu.googlegroups.com> In-Reply-To: <8e3685ad-8a71-4912-a86d-746076215606@64g2000hsu.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <48e34772$0$17131$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 01 Oct 2008 11:48:34 CEST NNTP-Posting-Host: d11086c1.newsspool2.arcor-online.net X-Trace: DXC=NZZU5]BkMaT@@RW1FjIB5SA9EHlD;3YcR4Fo<]lROoRQ4nDHegD_]RU6?Z Adam Beneschan schrieb: > The function > > Ada.Strings.Fixed.Trim (S, Ada.Strings.Both) > > will get rid of all leading and trailing spaces from S. > > I'd much prefer to have an 'Image attribute that didn't add that blank > (it only adds it for nonnegative numbers). Can I suggest a stronger emphasis on the Ada packages providing value-to-string conversions. Isn't the 'Image attribute already overused? (Worse, non-portable 'Img seems to be popular.) Anyway, the 'Image attribute is not available for all types. > I'm not sure why the > decision was made (back in Ada 83) to add the blank; having a > formatted number with either a blank or a minus sign in front can help > get numbers lined up in a report, but 'Image returns a variable-length > string anyway so I don't think it could be used effectively to line > anything up. Just speculating, maybe positioning used this procedure? procedure SET_COL (TO : in POSITIVE_COUNT); Anyway, there is, and seems to have been, procedure PUT(TO : out STRING; ITEM : in NUM; BASE : in NUMBER_BASE := DEFAULT_BASE); where TO'Length would have to be equal to the number of digits in Word/2**8.