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 X-Google-Thread: 103376,8f802583e5c84fa X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: String filtering Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1j92wa9843ylq.16j89wuqatbaj$.dlg@40tude.net> <433924a2$1_1@glkas0286.greenlnk.net> <43392732$1_1@glkas0286.greenlnk.net> Date: Tue, 27 Sep 2005 14:54:30 +0200 Message-ID: <1jd30obyohnp6$.41tz3funikly.dlg@40tude.net> NNTP-Posting-Date: 27 Sep 2005 14:54:28 MEST NNTP-Posting-Host: 280063eb.newsread2.arcor-online.net X-Trace: DXC=jY_6F@6mI^8RTD7Kih:TB8Q5U85hF6f;4jW\KbG]kaM8GSi?jHD8GO0D61fVENhMO:[6LHn;2LCV>7enW;^6ZC`4<=9bOTW=MN> X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:5188 Date: 2005-09-27T14:54:28+02:00 List-Id: On Tue, 27 Sep 2005 12:12:32 +0100, Martin Dowie wrote: > Martin Dowie wrote: >> Dmitry A. Kazakov wrote: >> [snip] >>>> New_Str := To_Unbounded_String(""); >>> >>> No need for that, it is initially an empty string. >> >> Nope - it's an uninitialized string. But I agree that it you've >> already determined the size then there is no need for this as each >> character in New_Str will be certain to be filled. > > Actually, the OP has it right, because it's uninitialised it is filled with > rubbish and of the size requested and the OP is going to /append/ items to > it, so it needs to be empty before the loop starts. No. ARM 95 A.4.5(49) reads: "...If an object of type Unbounded_String is not otherwise initialized, it will be initialized to the same value as Null_Unbounded_String." -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de