03-04-2014 11:53 PM
Yep, still there in 2013 too. I just installed it on a test PC just to try it.
03-05-2014 12:02 AM
03-05-2014 12:11 AM
Which is not a bug?
The array size not being zero?
Or the for loop iterating on it?
Or both?
I can almost follow your reasoning on the array size, but I have to say a for loop iterating on an empty array seems counter intuitive.
From my tests, the for loop only ever iterates once, even if the phantom array size is greater than one... still not a bug?
03-05-2014 08:41 AM - edited 03-05-2014 08:43 AM
While there is something to say about making LabVIEW übersmart, I'm siding with altenbach here, thinking this is strictly speaking not really a bug. An array of 2 * 0 dimension is NOT the same as an array of 0 * 0 dimension eventhough it contains the same data.
Personally I don't consider this a bug, but any code that would depend on LabVIEW executing the For loop 0 times certainly should be considerd buggy.
03-05-2014 09:53 AM
@Ben wrote:
Nobody else evens want to comment?
I passed this around in the office ....
and nobody got the answers right, including (4) CLA's.
So are you telling me that everyone knows this already? If so Y'all are much smarter than I thought.
Ben
There must be something wrong with my brain because I guessed the correct answer. Maybe in the back of my mind I know what LabVIEW will do with this "feature". Or maybe I was expecting a trick answer.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-06-2014 07:18 PM
This behavior is not a bug. We intentionally keep dimension size information, even for empty arrays. If we instead forgot the the sizes, then other VIs would "misbehave" in unexpected ways, like the diagram below.
We have tried to be consistent about the behavior, so the reshape array node not respecting the dimension sizes of empty arrays is a bug.
03-07-2014 07:41 AM
@RyanLV wrote:
This behavior is not a bug. We intentionally keep dimension size information, even for empty arrays. If we instead forgot the the sizes, then other VIs would "misbehave" in unexpected ways, like the diagram below.
We have tried to be consistent about the behavior, so the reshape array node not respecting the dimension sizes of empty arrays is a bug.
Okay here I think it makes sence. If the Fav Array always returned an empty array then the 2D array of the numeric between the for loops would be empty. But the dimensional size still has 3 rows, even though it has zero columns. If an array with 0 columns meant 0 rows, then the second loop wouldn't run at all. As it is right now it will run the 3 times, and the dimensional size of the column will be 0.
I guess I understand the why, but I wonder how often my code would break if the change was made where an array with one dimension being 0 meant all others were as well. What I'm trying to say is I can't think of times where my code relies on multple arrays in this way, but I guess I can't be sure.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-28-2016 12:24 PM - edited 08-28-2016 12:24 PM
RyanLV wrote:We have tried to be consistent about the behavior, so the reshape array node not respecting the dimension sizes of empty arrays is a bug.
Do you have a CAR for that? It is not fixed yet, even in 2016.
08-29-2016 05:13 PM
Hi everyone,
CAR 602575 has been filed for the Reshape Array behavior when given 0-dimensions as an input.