I am wanting to know if you can delete an element from an array, index the deleted portion,
and update the value of Array to not include the deleted portion in a more direct way than the following:
Or, in my program, the array is initialized with certain indices which makes the task of removing an element from
the array, indexing the deleted portion, and updating the array to not include the deleted portion similar to the following:
a) Is there a way to do this without having to use Local Variables?
b) Should I be so concerned about ridding my program of all Local Variables? (even ones that don't create race conditions)
Solved! Go to Solution.
"Keep the array in a globally initialized feedback node. Don't involve front panel objects."
I suppose I need to include the fact that this is happening in an event structure where this happens for different events, not for each iteration of a loop.
I don't mean to come off as being obstinate, but, since my code works using the method shown (and this is a very small part of the program), my main question is really:
"Is there a reason why I should take the time to do this another way?" (i.e. without using Local Variables in the way specified in the sample code provided)
Speed, memory usage and possibly avoiding race conditions. Learning better coding techniques is another good reason. But if it does what you need it to do then why bother. If you know how to use shift registers then you know how to use feedback nodes. They are kind of the same thing but without the loop.
Well, I suppose I will not worry about this then. I may come back to this in time -- this phase of the project will be fluid until summer.
If I do come back I now know to start by reading over feedback nodes.
Thanks for the help.
Feedback nodes are really cool things. Local variables - not so much
But seriously local variables do have their uses. This is just not the best use.
Also, Altenbach should get the solution. I answered a different question
If there were only a way to have multiple solutions.... I have a tendency to mark the solution of the last question instead of the initial...
Forgive me, Altenbach.
Forgive me, Steve.
Kudos all around.