Array values cannot have defaults

In X 2014 r 2.1 I opened my project and got 2 errors for “arrays cannot have default values”
but if you click on the item on the right side there is a “Default” value property.

Why can’t it be set to zero if it’s listed there as a property?

[quote=131717:@Tim Turner]In X 2014 r 2.1 I opened my project and got 2 errors for “arrays cannot have default values”
but if you click on the item on the right side there is a “Default” value property.

Why can’t it be set to zero if it’s listed there as a property?[/quote]

Just remove the default value. When you put nothing in there, a numeric array will be set to zero upon construction anyway. If you want all elements to be set another default value, use a loop or for each in the open event.

Because an array can’t be set to 0. If it’s some type of number array, then each element can be set to 0, but it starts that way anyway.

If you want the Ubound to start at zero, you can declare the property that way with a zero between the parens.

It previously wasn’t flagged for some reason (until the last few versions), but it didn’t work before anyway. I found several instances in my code were I thought it had the default values set in the Inspector (before it was flagged in a previous version), but they weren’t actually set. Set the defaults in code as mentioned above. There is another topic on this a few months ago.

[quote=131717:@Tim Turner]In X 2014 r 2.1 I opened my project and got 2 errors for “arrays cannot have default values”
but if you click on the item on the right side there is a “Default” value property.

Why can’t it be set to zero if it’s listed there as a property?[/quote]
Bug
The ONLY permissible default value for an array is NIL
Trying to initialize an array of values won’t work and is whats flagged