BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Why some people say Local Variables are bad...

Let's keep reinitializing the indicators with each iteration of a loop, and create some race conditions while we're at it:

 

 

 

 

From here.

Message Edited by smercurio_fc on 05-05-2010 11:02 AM
Message 201 of 396
(8,443 Views)

Localitis @ 3:09 in the FIRST Robotics promo video. Look at me (what a schmuck)... picking on high-schoolers...

 

 

FIRSTLocalitis.jpg 

 

 

Message Edited by JackDunaway on 05-17-2010 09:49 PM
Message 202 of 396
(8,358 Views)
they pick up bad habits at a young age
0 Kudos
Message 203 of 396
(8,335 Views)

 (seen here)

 

Message 204 of 396
(8,177 Views)

(seen here)

 

What line # (i) do we get near the upper right corner????

 

 

Message 205 of 396
(8,118 Views)

altenbach wrote:

(seen here)

 

What line # (i) do we get near the upper right corner????

 

 


Does it even increment?  which executes first the increment then write to local or the read local and write to terminal?


"Should be" isn't "Is" -Jay
0 Kudos
Message 206 of 396
(8,078 Views)
There is only one writer, so it will definitely increment between iterations. The line we get could be current or stale.
0 Kudos
Message 207 of 396
(8,076 Views)
yes- but was current or stale read in the lower right? and was it written to the terminalSmiley Surprised before or after the value is incremented? (Ahh.... Line not i) my mis-read
Message Edited by Jeff Bohrer on 06-14-2010 11:34 AM
Message Edited by Jeff Bohrer on 06-14-2010 11:35 AM

"Should be" isn't "Is" -Jay
0 Kudos
Message 208 of 396
(8,071 Views)

altenbach wrote:

(seen here)

 

What line # (i) do we get near the upper right corner????

 

 


That should be easy, doesn't LabVIEW execute code left to right??? Smiley Tongue

0 Kudos
Message 209 of 396
(8,056 Views)
Maybe we can get the OP toexplain.jpg
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 210 of 396
(8,052 Views)