Jump to content
News about the LabVIEW Wiki! Read more... ×
Neil Pate

Local variables default to write

Recommended Posts

I use locals sparingly, but in my typical use case where I really just need to use a value in more than one place (lazy yes, but not worth the effort to do it any other way) I need to read from a local rather than write to it. The default condition is to write though, so I need to change my virtually every time I need to use one. 

Am I the odd one out here?

Don't suppose there is some SuperSpecialIniKeyForDefaultLocalVariableDirection?

 

 

Edited by Neil Pate

Share this post


Link to post
Share on other sites

Create a local variable. Set it to read. Use the pointer tool to grab it and create a copy. Works on anything, not just variables.

Share this post


Link to post
Share on other sites

Yeah if you default to one you are going to upset one group of people or another.  I would guess NI's thoughts were it you wanted to read a control just use its terminal, and a developer would be more interested in writing a local variable.

If you aren't CTRL dragging yet you would be. I is a bit odd that that operation does something different than a copy paste but I like it.

Share this post


Link to post
Share on other sites

Sure I know about the CTRL-drag trick, I use it all the time. The problem is I use locals seldom, so most of the time there isn't another one to clone nearby on the BD.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.