On Sat, 28 Nov 2009, Anthony Walter wrote:

PrivateMyVariableSet is not intialised, so will have an undefined
(random) value when InitMyVariable is first called.
Mattias' code given earlier avoids this problem.

Bzzzt. Wrong.

Global variables (even in the implementation section) are always
initialized to 0.

This is not guaranteed in any way. It happens to be so most of the time,
but your code should never assume this is so, except for global Ansistring variables.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to