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,8f802583e5c84fa X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!proxad.net!easynet-monga!easynet.net!news-peer-lilac.gradwell.net!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada References: <1j92wa9843ylq.16j89wuqatbaj$.dlg@40tude.net> <433924a2$1_1@glkas0286.greenlnk.net> Subject: Re: String filtering Date: Tue, 27 Sep 2005 12:12:32 +0100 Organization: BAE SYSTEMS X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Message-ID: <43392732$1_1@glkas0286.greenlnk.net> X-Original-NNTP-Posting-Host: glkas0286.greenlnk.net NNTP-Posting-Date: 27 Sep 2005 11:13:36 GMT NNTP-Posting-Host: 20.133.0.1 X-Trace: 1127819616 news.gradwell.net 38046 dnews/20.133.0.1 X-Complaints-To: news-abuse@gradwell.net Xref: g2news1.google.com comp.lang.ada:5185 Date: 2005-09-27T11:13:36+00:00 List-Id: 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. Cheers -- Martin