BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Why some people say Local Variables are bad...

No comments...
 
Message 11 of 396
(16,732 Views)
The loop will never stop.. Notice that "Acquire Data" is wired to Continue if True, and it's in the TRUE case selected by...  (drum roll...) "Acquire Data"!
 
 
Message 12 of 396
(16,730 Views)
All values passed by Locals...  or to make matters more fun... Globals!!
 
 
 
Message 13 of 396
(16,727 Views)

JoeLabView wrote:
 

This liks like an Aztec Pyramid from above. Let's call it the Aztec Coding style. :D
Message 14 of 396
(16,726 Views)
Joe LabView:  You need to find out who the authors of these examples are and stop them from proliferating any more code.  They are giving Labview a bad name.
- tbob

Inventor of the WORM Global
0 Kudos
Message 15 of 396
(16,717 Views)
LOL!! yes it looks like a pyramid..  And yes, the authors are within the thread they were found.. just follow the link.
 
Post any examples you find of Locals abuse..!!  or Locals causing headaches!
 
 
0 Kudos
Message 16 of 396
(16,707 Views)
Well, it seems that this thread is obviously slanted to the "locals/globals are bad" side. Perhaps for balance we need a "here's good ways to use locals & globals" thread.

Here's a recent entry.
0 Kudos
Message 17 of 396
(16,698 Views)
edit - whoops, there's a whole second page


Message Edited by JeffOverton on 05-22-2008 02:05 PM
0 Kudos
Message 18 of 396
(16,691 Views)
Thanks smercurio,
 
Yes, it is slanted...  The purpose is not to say that they are bad.. nor that they are good..
It is simply to show that in Labview, it is a common source of errors..  Mostly due to bad usage of Locals.  Same can be said with any syntax of a programming language.. 😮
 
If people treated Locals with respect (no abuse), then ... well... we wouldn't have to fix so much code.. 😉
 
However, the reason why the thread appears slanted is with the purpose of the thread, as depicted by the title.  🙂
 
RayR
 
0 Kudos
Message 19 of 396
(16,682 Views)

Multiple Locals and Multiple Loops..  A mix for success..

(from http://forums.ni.com/ni/board/message?board.id=170&message.id=111134)

Message 20 of 396
(16,656 Views)