BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Why some people say Local Variables are bad...

DAQ Assistants Suck! Smiley Tongue
Richard






Message 191 of 396
(8,266 Views)

I would like to thank newbieboy for a beautiful example of a race condition, which can be found here.

 

 

 

Oh yeah.. I forgot that the snippets have the same feeling towards locals as I do.  In the original code, it is a Local Variable of the x=y? indicator that is wired to the Case Statement.

Message Edited by Ray.R on 05-04-2010 08:26 AM
Message 192 of 396
(8,172 Views)

Ray.R wrote:

Oh yeah.. I forgot that the snippets have the same feeling towards locals as I do.


Not if you use the CCT to create them. It manages just fine with both locals and property nodes.

Message Edited by tst on 04.05.2010 04:17 PM

___________________
Try to take over the world!
Message 193 of 396
(8,163 Views)

Ray.R wrote:

I would like to thank newbieboy for a beautiful example of a race condition, which can be found here.

 

Oh yeah.. I forgot that the snippets have the same feeling towards locals as I do.  In the original code, it is a Local Variable of the x=y? indicator that is wired to the Case Statement.


 

Of course, the beauty is that it's still a race condition even with the reference!

0 Kudos
Message 194 of 396
(8,152 Views)

tst wrote:
Not if you use the CCT to create them. It manages just fine with both locals and property nodes.


If you use the Code Capture Tool, can you also drag it into the block diagram like the code snippet?

 

0 Kudos
Message 195 of 396
(8,141 Views)

Ray.R wrote:

If you use the Code Capture Tool, can you also drag it into the block diagram like the code snippet?

 


No.  Code Capture Tool is just a picture.  But at least its a real picture and doesn't discriminate against local variables like we do.

 

- tbob

Inventor of the WORM Global
Message 196 of 396
(8,145 Views)

Ray.R wrote:


If you use the Code Capture Tool, can you also drag it into the block diagram like the code snippet?


Despite what tbob said, you can, at least in modern versions of the CCT. You're welcome to try it with the snippet I posted earlier.

Incidentally, the CCT supports snippet creation for any version from LV 7.0 and up, and there's a JKI plugin which will allow you to import the snippet, which works from 8.2 and up.

 

You can find the CCT here, with some videos which show the new features. If you want direct access to the videos, they should be here.


___________________
Try to take over the world!
Message 197 of 396
(8,138 Views)

Well... I'll be a flying swordfish...

 

It worked..  I'll definitly switch to it.

 

Thanks tst

0 Kudos
Message 198 of 396
(8,119 Views)

tst wrote:

Ray.R wrote:


If you use the Code Capture Tool, can you also drag it into the block diagram like the code snippet?


Despite what tbob said, you can, at least in modern versions of the CCT. You're welcome to try it with the snippet I posted earlier.

Incidentally, the CCT supports snippet creation for any version from LV 7.0 and up, and there's a JKI plugin which will allow you to import the snippet, which works from 8.2 and up.

 

You can find the CCT here, with some videos which show the new features. If you want direct access to the videos, they should be here.


 

Sorry.  I had no idea CCT would do this.  I must have the old version.  Switching to the new right now....

 

Well... I'll be a flying squirrel.  It creates snippets. Smiley Happy

 

Message Edited by tbob on 05-04-2010 12:58 PM
- tbob

Inventor of the WORM Global
0 Kudos
Message 199 of 396
(8,110 Views)

tst wrote:
[...] and there's a JKI plugin which will allow you to import the snippet, which works from 8.2 and up.

The JKI RCF plugin is here.

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

0 Kudos
Message 200 of 396
(8,103 Views)