What does "require explicit initialization of local variables" mean?

Where is this project option documented? Does this imply that local variables AREN’T initialized to the default for their type? (basically zeros, I think is what .net does. Integer is 0, Boolean is False, object is nil, etc.)

What does this option mean? When do you want to use it? Or not use it?

I couldn’t find anything by asking for help in the IDE (which took me someplace in Visual Basic’s help), or anyplace else I searched. Did I miss it or is there something somewhere?

When set local variables/result isn’t presumed to be nil/0/False but have to be assigned before you can use them. It matches the behavior C# /Swift has, it only affects Oxygene.

So, I think you are saying that when the option is OFF, then the variables get the nil/0/false, correct? If so, I will have to make sure it is off because I know I made that assumption in my code.

I’d have to check, but I’m almost certain the behavior of C# is the nil/0/false type behavior. Yeah, I checked and there are default value types for C#: https://msdn.microsoft.com/en-us/library/83fhsxwc.aspx

I’m not sure you are saying that C# WAS having defaults, or was not, but I’d say it does have defaults. No idea about Swift.

What about a place that documents this option? Is there a place?

There should be. I’ll look into ti tomorrow. This option doesn’t disable initialize to 0. What it does is do warn on things not being initialized before their first user.

hmmm… Sounds like the option name isn’t very helpful as to what it does then. Appreciate you looking it up. Thanks.

Thanks, logged as bugs://72420