02-02-2012 11:45 AM
Ray.R wrote:Yes... There are many pitfalls.. Maybe like you said, we could have a sub forum. However, we would not want to give the idea that LabVIEW has pitfalls.. All programming languages do.. It's the programmers that create the pitfalls... 😉
Maybe a sub-forum called "Gatchas"... LOL! 😄
Good point that.
"How not to do it"
02-06-2012 09:30 AM - edited 02-06-2012 09:31 AM
And now for another example of the pointlessness of the locals:

The other cases in the event structure are basically the same.
02-06-2012 10:58 AM - edited 02-06-2012 11:01 AM
@smercurio_fc wrote:
The correct link is actually here.
Even funnier is the timeout case for the UI. It basically tickles most indicators every 100ms. None are connected, because they are all updated via locals elsewhere. Why? Why? Whyyyy? What a waste of CPU cycles. Omitting the timeout case entirely would not change a thing! 😄

02-06-2012 02:38 PM
Thanks for the link correction, altenbach.
Yeah, I got a chuckle out of the Timeout case when I first saw it as well.
02-06-2012 07:00 PM
How about the first frame of this sequence:

02-06-2012 07:17 PM
@nathand wrote:
How about the first frame of this sequence:
Typical text programmers! 😄
That almost looks like "Local Variable Russian Roulette"! 😮 (A big step above a simple race condition). For the "Temp data array" we have three readers and four writers nearly concurrently.
You covered the problems nicely in your reply. In addition, I would recommend to transpose before the complex to RE/IM: Only one instance needed.
05-24-2012 08:08 AM
Not only was this one a Rube Goldberg example, it is also an example of Locals abuse. Locals as in Local Variables, not people in the vicinity.

06-05-2012 09:46 AM
More localitis and sequenceitis (as Altenbach put it).
http://forums.ni.com/t5/LabVIEW/String-box-rejects-input-after-built-with-App-Builder/td-p/2017204
06-05-2012 10:31 AM
there is worse than locals... take a look at the VI attached in this post ![]()
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
06-05-2012 10:38 AM