Re: String filtering



David Trudgett wrote:

New_Str := To_Unbounded_String(Dest_Size);

Why not do this in the declaration of New_Str, and avoid the double initialization? In the rare (I presume) case where you will return a null string, this will initialize New_Str with a null string [Length (New_Str) = 0], and in all other cases, it avoids the double initialization. Not a big efficiency concern, but an aesthetic one.


--
Jeff Carter
"You tiny-brained wipers of other people's bottoms!"
Monty Python & the Holy Grail
18
.



Relevant Pages

  • Re: double re, im; re(r), im(i) vs re=r, im=i
    ... Alf P. Steinbach wrote: ... One might also presume that I looked before asking the question. ... > or, even better, to remove the need for a particular initialization order. ... At that point I usually document the dependencies and move on. ...
    (comp.lang.cpp)
  • Re: Why doesnt this work? (pointers)
    ... > Ron Natalie wrote: ... >> duration are not default initialized. ... so I presume the latter. ... should not depend upon default initialization of such ...
    (comp.lang.cpp)