On Mon, 11 Dec 2006 00:32:54 +0000 "Paul Herring" <[EMAIL PROTECTED]> wrote:
> On 12/10/06, ed <[EMAIL PROTECTED]> wrote: > > "Paul Herring" <[EMAIL PROTECTED]> wrote: > > > > > Platform has nothing to do with it. If we're talking about C or > > > C++, then i is uninitialised. It can be anything. Nowhere in The > > > Standards does it imply that i, in example 1 above, must be 0. > > > > the standards don't, i have a feeling that some executions would > > initialise i to 0. don't some microsoft compilers do this? > > They don't have to, and it's foolish to write code that assumes it. > (What you're possibly remembering is that debug versions of MSVC tend > to 'initialise' uninitialised variables with a non-zero number that's > recognisable in the debugger, for example IIRC pointers were > initialised to 0xcdcdcdcd.) i think in some cases they are, but the debug also picks up on NULL, which it displays as "bad ptr". you're right about it being foolish to think that an uninitialised value is going to be 0. -- Regards, Ed :: http://s5h.net/qf just another bash person The real reason dinosaurs went extinct was because McDonalds wa attempting to keep up with Mr. T's demand for the McRib sandwich.
