05-30-2006 08:52 AM
05-30-2006 08:59 AM
05-30-2006 09:07 AM
@smercurio_fc wrote:
easily bypassed by just using wires rather than unbundling the same element more than once,
Unfortunately, I had to conclude that this really was the source of the missing data in my code before I could come up with this solution (something which took close to an hour).
Also, I hope I haven't done this anywhere else where it went unnoticed.
05-30-2006 09:09 AM
05-30-2006 11:00 AM - edited 05-30-2006 11:00 AM
Message Edited by altenbach on 05-30-2006 09:04 AM
05-30-2006 11:19 AM
@altenbach wrote:
Still one wonders why anyone would use such a weird construct. 😮(Maybe LabVIEW should not even allow unbundling the same item more than once in a single unbundle node).
This specific construct was obviously just an example. The original was a much more complex version which included typedef clusters, LV2 globals and queues and did other things entirely.
Initially I thought the source of the problem might be the typedef, but I eventually managed to narrow it down to a single VI. The local was put there specifically to cause the problem.
The main reason for doing this is that some reasonable programmers would prefer letting LV do a +1 calculation twice in order to get a cleaner diagram. Specifically, this was an incrementing counter which was compared against another value and then wired into the F input of a select primitive. Since both the comparison and the incrementing needed +1 I performed it twice.
I see no reason why LV shouldn't allow unbundling the same element twice - when using a large cluster you might wish to get the same element in more than one place on the screen and I prefer to avoid having wires cross each other.
05-30-2006 11:32 AM
05-30-2006 11:47 AM - edited 05-30-2006 11:47 AM
Agreed. Similarly, bundling the same value multiple times is just a cause for confusion. Anyone take a guess what the value of the cluster will be here (... and will it still be the same result in the newest LabVIEW version 20 years from now?). 😉
Message Edited by altenbach on 05-30-2006 09:49 AM
05-30-2006 11:53 AM - edited 05-30-2006 11:53 AM
Message Edited by smercurio_fc on 05-30-2006 11:54 AM
05-30-2006 12:36 PM
@altenbach wrote:
Similarly, bundling the same value multiple times is just a cause for confusion.
Now you're just being unfair. There is a great difference between reading multiple times and writing multiple times. I see absolutely nothing wrong in unbundling the value multiple times for readability's sake, as long as the programmers make sure they selected the correct element.
Thank you, smercurio, for protecting the innocent users walking through the jungle of the web.