"Phil Holmes" <m...@philholmes.net> writes:

> In C-style languages, uninitialised variable are uninitialised and
> therefore have an indeterminant value.

Wrong for statically allocated variables.

> Hence the danger of uninitialised pointers. Some other languages do
> initialise them to 0 - visual basic is an example. In more modern
> languages, (c# is one I'm familiar with) the compile fails if a
> variable is not explicitly initialised.

In C++, the compilation is not guaranteed to succeed if the variable is
not explicitly _instantiated_ in some compilation unit (rather than just
being declared as extern).  An initialization need not happen: binary
zeros is the default.  Unless we are talking classes with constructors.

-- 
David Kastrup


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to