04-08-2013 02:45 PM
I have found a nice question for CLAD:
What is the size of the output 2D array when concatenating no-empty 2D array with an empty 2D array?
a) the same as original 2D
b) not the same as original 2D
c) none of the above
Correct answer (c): it depends on the way the empty 2D array was made. If it was a 1D array sometime ago, then the size will increase, otherwise the size will not change.
Building 2D array with an empty 1D array will also add line of zeros.
Is it really an expected behaviour?
04-09-2013 11:06 AM
So I agree with you that this looks like both outs should be the same. But if you probe around you will see why this is happening (not saying it is right just why).
If you put an Array Size in there to see what the size of the "Empty" arrays are you see that in one dimension it is 0 but in another it is 1. This is kinda like the wind having direction but no speed. Because of this the build array operation may do different things because the two Empty arrays are equal in data, but not in attributes.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-10-2013 08:43 AM
The thing I do not like most in this issue is that array has hidden parameter that can not be determined by looking at its data. It is hard to find mistake of this kind during debugging (by probing). And it kind of contradicts LabVIEW high level programming: user can not directly control array memory allocation (other than by adding data), but this behaviour makes array properties separate from data.
I will add the idea to include array size into default probe information.
04-10-2013 09:30 AM
@Alexander_Sobolev wrote:
I will add the idea to include array size into default probe information.
This can be done quite easily with a custom probe and even have options to set a breakpoint if array size in a defined dimension is greater than, less than, or equal to a value.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-10-2013 09:52 AM
@Hooovahh wrote:
@Alexander_Sobolev wrote:
I will add the idea to include array size into default probe information.
This can be done quite easily with a custom probe and even have options to set a breakpoint if array size in a defined dimension is greater than, less than, or equal to a value.
Plus, it's already been suggested.
I haven't really looked into it but is this the same as this, brought up in the minutiae thread?