D4 Help claims that *global* variables are automatically initialized to 0, whereas *local* variables contain random data until a value is assigned to them.
For *global* variables I presume this means...
integers initialized to 0
booleans initialized to false
strings initialised to ''
pointers / object refs initialized to nil
Is this correct?
Also, I assume that private/public member fields of a class are considered *global* variables in this context and are therefore also intialized to 0. Is this also correct?
Do *local* variables then refer only to variables declared within a procedure or function, whether it be a unit function or class member function.
Do any compiler or linker settings affect how variables are initialized (e.g. optimisation)?