Re: String filtering



David Trudgett <wpower@xxxxxxxxxxxxxxxxxxxxxxxx> writes:

> Thanks for pointing that out, by the way, because I wasn't sure
> initially. I'm loathe, however, to depend upon default
> initialisation, even when it's specified in a standard.

Where the standard specifies initialization (eg for access types, or
here) you probably won't get a warning for 'used before written
to'. But in other cases, if you don't know what to set the variable to
it is better _not_ to initialize it; that way the compiler has at
least a chance to tell you if you haven't set the value before using
it.
.



Relevant Pages

  • Re: String filtering
    ... I'm loathe, however, to depend upon default initialisation, even when it's specified in a standard. ... Where the standard specifies initialization (eg for access types, ...
    (comp.lang.ada)
  • Re: public vs global and scoping trouble
    ... Thanks a lot Bob! ... I didn't realise that the initialisation was an ... Thank you for pointing that out. ... Prev by Date: ...
    (microsoft.public.vb.general.discussion)
  • Re: global variable and scoping
    ... Thanks a lot Lee! ... I didn't realise that the initialisation was an ... Thank you for pointing that out. ... Prev by Date: ...
    (comp.lang.basic.visual.misc)
  • Re: How Methods Return Objects
    ... >I wonder why you didn't use initialisation here... ... Thanks for pointing that out. ... Thanks for you other explanations as well. ...
    (comp.lang.cpp)