05-19-2016 10:21 AM - edited 05-19-2016 10:22 AM
According to the LV help, arrays have two defaults, the normal default and the default for undefined array elements.
I presume there must be a way to specify the later default but I cannot find it anywhere. Any ideas?
Solved! Go to Solution.
05-19-2016 10:33 AM
Hmmm, I don't like their choice of wordings.
I would call it uninitialized, not undefined.
Unless of course an empty array container is considerd "undefined"
05-19-2016 10:34 AM
I know you can drag the element out of the array container. Change the default on that scalar element. Then drag the element back into the array container.
05-19-2016 11:03 AM
Thanks! I tried setting the default in place, making a typedef, etc but did not think to drag it out and back in again.
05-19-2016 11:10 AM
In case it's not clear - the value for uninitialized elements is an edit-time only thing and really only makes a difference in what value is filled in if you, say, modify element 6 without previously definining elements 0-5. If you index an undefined element in your code, you'll still get the default value for the datatype (ie, 0 for a numeric) regardless of what you set the uninitialized element value to be.
05-19-2016 11:12 AM
... and to make things much easier in the future, please vote for this idea. 😄
05-19-2016 11:16 AM