LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing Empty 2D Arrays

Solved!
Go to solution

I have an application which asynchronously calls a Dynamic Dispatch VI which the user interacts with, and then compares the output class data with the input to see if the user made any changes. I discovered that when comparing empty 2D arrays, if one array originated as an empty constant and the other was from an empty 1D array built into a 2D array the equals primitive will return false. This is not the case if they are both constants or both built from empty 1D arrays so it doesn't seem to be a quirk due to the array being empty.

 

Is this a bug or am I missing something? I have a workaround but it's not particularly elegant. This is in LabVIEW 2017.


Compare Empty Arrays.png

image.png

0 Kudos
Message 1 of 4
(2,245 Views)
Solution
Accepted by topic author Cy_Rybicki

Hi,

 

an array of zero rows and columns is different to an array of one row of zero columns...

 

This has been discussed before, search the forum!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,229 Views)

It is not really a bug, If you probe your arrays you will see that the row number is not 0.

 

It is just annoying that LabVIEW doesn't display the detail.

 

If you keep adding N empty rows and then one not empty row, you will get N zero padded rows.

 

Annotation 2019-08-29 155744.jpg

Message 3 of 4
(2,220 Views)

Thank you for responding, I did not think to check the array size. 

0 Kudos
Message 4 of 4
(2,207 Views)