Jump to content
Sign in to follow this  
crelf

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. :)

Share this post


Link to post
Share on other sites
It is possible to have a 0xn or an nx0 array in LabVIEW, where n is a non-zero number.

Awww man - you answered too quickly! :D

Share this post


Link to post
Share on other sites

Sorry, was I supposed to wait a while for people to be shocked and amazed before answering? ;)

-D

Share this post


Link to post
Share on other sites
Sorry, was I supposed to wait a while for people to be shocked and amazed before answering? ;)

Yes - yes you were :D

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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