BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Why some people say Local Variables are bad...

😉 still made the bad list LOL!! 
 
Let's not encourage bad programming... 😉
LOL!
0 Kudos
Message 41 of 396
(14,959 Views)
At least his main program was very streamlined. 😄
Message 42 of 396
(14,957 Views)
ROFL!!!  LOL!! 😄
0 Kudos
Message 43 of 396
(14,947 Views)
Ray,
 
Actually, it would be difficuilt to get the contents of control or indicator to jump the loop boundarys unless you did use a local. eg using a Button to stop several while loops.
 
On the other hand, it's just a bad example.
 
RayF
Regards
Ray Farmer
Message 44 of 396
(14,924 Views)

Hi RayF,

I used to program that way... using Locals...  And I had some strange behaviors to clean up after the code ... grew...

I now pass info using other methods that are more suitable for scalability..  I know it makes the code bigger at the beginning, but it is more robust.

As a matter of fact, I now implement an architecture that often avoids having two loops..  I prefer that.  The second loop is often not necessary.

RayR

0 Kudos
Message 45 of 396
(14,894 Views)

Nothing serious with the following example..  Simple solution was to use a shift register.

from: http://forums.ni.com/ni/board/message?board.id=170&message.id=334278#M334278



Message Edited by JoeLabView on 06-23-2008 07:59 PM
Message 46 of 396
(14,841 Views)

Someone is afraid of wiring directly...  This is probably more a Goldberg.

Actually, why is it needed if the value is almost immediately reset (it the sweep was complete)?   The only thing between setting the sweep complete value and resetting it is writing to a spreadsheet which should be relatively quick..

Maybe a bad example all together of Local abuse...  I just don't see why sweep complete is needed at all..  😮

from: http://forums.ni.com/ni/board/message?board.id=170&thread.id=336680



Message Edited by JoeLabView on 07-01-2008 02:33 PM
Message 47 of 396
(14,755 Views)

We're off to the races...

From:  http://forums.ni.com/ni/board/message?board.id=170&message.id=338085



Message Edited by JoeLabView on 07-07-2008 08:23 AM
0 Kudos
Message 48 of 396
(14,673 Views)

The only race condition I see is the error cluster for motor vs the time delay.

Can you spot another?

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 49 of 396
(14,664 Views)
I also find the unnamed subvi with one output and no inputs a bit confusing
0 Kudos
Message 50 of 396
(14,663 Views)