Jump to content

Is this array empty, or isn't it?!?


Recommended Posts

It is possible to have a 0xn or an nx0 array in LabVIEW, where n is a non-zero number. It has to do with the way the dimension data is stored. The easiest way I know to reproduce this is to take three empty 1D arrays, wire them all into a Build Array, and the size of the resulting 2D array is 3x0. If any of the dimensions of an array are zero, you have an empty array. In LabVIEW 7.x and previous, the best way to determine if an array is empty is to do an Array Size, and wire the resulting array of dimensions to Multiply Array Elements to see if you get zero. In LabVIEW 8.0 and later, you can simply wire your array into the Empty Array? function in the comparison palette.

-D

P.S. - This is not a bug. :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.