LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
PCorcs_DMC

In Place Auto Indexing

Status: New

Hello LabVIEW Users,

 

While working with a complex configuration application, I found myself heavily utilizing in place operations. Throughout the process of contstructing the code, I found myself commonly having to create an In Place Indexing structure (pictured below). I thought it would be really nice if you could mark an auto-indexed array for in place operation. As always, I am open to suggestions, but thought this might be a nice creature feature:

 

Capture.png

 

Cheers, and happy coding. 

~Pcorcs
14 Comments
AristosQueue (NI)
NI Employee (retired)

> They may be getting fewer and fewer in number, but they're still there.

 

And they always will be there. The IPE should be used when you're accessing an element and then unconditionally putting it back. It is a valuable hint to the compiler about your intent as a programmer. Just don't use it when other syntax is already providing the same hint!

PCorcs_DMC
Member

For the purpose of specificty, this is my most common use case for the type of structure described. If these are always and forever identical in the eyes of the compiler, then I will adopt new coding practice. I have never been sure, and have always tried to be specific with the IPE construction:

 

ObjectBased.PNG

Edit: Forgot to mark as modifier in the image.

 

Thanks for all the discussion. 

~Pcorcs
AristosQueue (NI)
NI Employee (retired)

PCorcs_DMC: Yes, those are the same. If you add the Mark As Modifier setting, those are NOT the same -- at that point you are overriding the compiler analysis and saying "I know better than you" -- and I strongly doubt that you do. There is as of 2014 zero known conditions where the Mark As Modifier is a good idea. The compiler analysis is now stronger than any human declaration of that functionality. I am not saying that we might not find one again somewhere, but we do not know of any at this time.

wiebe@CARYA
Knight of NI

>at that point you are overriding the compiler analysis and saying "I know better than you" -- and I strongly doubt that you do. 

 

If the data is modified by a dll, then the mark as modified is needed. The compiler won't be able to detect that, and will assume the data isn't modified.

 

Not marking 'mark as modified' will have funky effects.