Re: How to set local variables automatically?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Iwan Petrow <xxxxyz@xxxxxx> wrote:
> But I want this happens automatically. When I write "int i;" i have to
> be 0.

You can't, and I can't see any good reason why you'd want to.

Just declare your variables at the point of first use - that covers
almost all situations, IME, and makes your code clearer.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.



Relevant Pages

  • Re: Threads Question
    ... >> overlooking it for some reason... ... > If replying to the group, please do not mail me too ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Hey, what is all this off topic posting?
    ... That's a good enough reason. ... Thanks, Frank. ... (remove 'q' and '.invalid' when replying by email) ... Prev by Date: ...
    (sci.electronics.design)
  • Re: AD and ADAM
    ... Thanks for replying. ... but for some reason I cannot get the users and roles from AD. ... Regards, ... Prev by Date: ...
    (microsoft.public.windows.server.active_directory)
  • Re: my erratic function
    ... passed on replying. ... > reason for that is, well Al, buddy, lets face it, you da man. ... Prev by Date: ...
    (microsoft.public.vb.general.discussion)
  • Re: Delphi development team poll. Would you stay with Delphi if will it will be extracted in separat
    ... CNemo wrote: ... Replying on this kind of message ... could be a reason to be sacked or at least get severely reprimanded. ... Prev by Date: ...
    (borland.public.delphi.non-technical)