BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Why some people say Local Variables are bad...

And no way to stop that program without crashing the car!
Message 21 of 395
(15,165 Views)
I like the "//" in all the comments in post 11...destined for variable abuse.
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
Message 22 of 395
(15,160 Views)

// LOL! 

// You're right!  That's got to be a hardcore "Learn to program in C++ in 21 days"..  🙂 

// Let's make sure comments are real comment

/*  The C version would have been like this.

LOL! 😄  */

Message 23 of 395
(15,141 Views)

Another race condition spotted by smercurio in this thread

 

Message 24 of 395
(15,105 Views)


JoeLabView wrote:

Another race condition spotted by smercurio in this thread


This just updates an indicator and the value will be correct 5ms later. No big deal except for the fact that it updated the indicator with every iteration,
despite the fact that the value only needs to update at rare occasions.
 
He also points out a race condition for the x and y booleans in the same post. These might be more serious because further calcuations in the same
iteration directly depend on the possibly stale values.
 
 


Message Edited by altenbach on 05-24-2008 10:17 AM
Message 25 of 395
(15,101 Views)
Well, value properities are about the same as locals (except for less efficiency ;)).
 
 
Note in which order the "Experiment scenario" get it's values. 😮
As soon as the calculated data from the formula node is inserted, all gets overwritten by the default data and placed back in the original control.


Message Edited by altenbach on 05-27-2008 01:48 PM
0 Kudos
Message 26 of 395
(15,016 Views)
In this thread, apparently we have to use a local variable to turn the occurrence of an error to stop the loop (rather than a simple unbundle and Boolean operator).




Message Edited by smercurio_fc on 05-28-2008 01:55 PM
0 Kudos
Message 27 of 395
(14,978 Views)
or just wiring the error cluster to the loop
0 Kudos
Message 28 of 395
(14,972 Views)
Except that you need to be able to stop the loop on either of 2 (or both) conditions. Smiley Wink


Message Edited by smercurio_fc on 05-28-2008 02:16 PM
0 Kudos
Message 29 of 395
(14,968 Views)
That was my first idea too, but I think he also wants to be able to stop the loop manually.
0 Kudos
Message 30 of 395
(14,965 Views)