ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array size of empty array - bug

Let me rephrase ‘expected output’ and ‘unexpected output’ as output 1 and output 2. Apparently both 1x0 and 0x0 arrays are empty arrays, so I assume these arrays to behave exactly same in any given instance. Since 1x0 and 0x0 empty arrays had different behavior i.e. output 1 and output 2 (irrespective of which is right/expected) in the discussed example, I considered it has a bug.

 

Necessarily, should I consider 0x0 and 1x0 empty arrays as two different instances of empty array and expect it to behave independently?

0 Kudos
Message 11 of 13
(1,362 Views)

@sharath006 wrote:

 

Necessarily, should I consider 0x0 and 1x0 empty arrays as two different instances of empty array and expect it to behave independently?


Yes.

0 Kudos
Message 12 of 13
(1,358 Views)

It seems confusing, but i think it's helpful to think of a Nx0 or 0xN array as an Array of Empty, instead of an Empty Array. The Empty Array primitive checks if some dimension is 0, but just like Inf /= Inf sometimes two empty arrays can be different.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 13
(1,342 Views)