Mail Archives: djgpp/1995/10/15/04:54:04
The definition of C says that global data that is not explicitly
initiallized is initiallized to zero. Not all compiler/linkers/loaders do
it right, but they are broke, not the program. Local (auto) data is
another matter. Heap space is also not required to be initialized.
Jere McDevitt (mictali AT netcom DOT com) wrote:
: Just a thought, but I remember back in my old programming days (pre C++)
: that all of the "good" programmers said NEVER count on a variable having
: a value before you initialized it. I know that Borland zero's out the
: global data, so maybe we've gotten a little lazy expecting a variable to
: be 0'd without doing it ourselves.
: My thoughts are my own.
: Jere McDevitt
--
============================================
Without my guitar, I am a poet without arms.
- Michael Bloomfield
============================================
- Raw text -