A somewhat related idea was submitted some time ago that might be of interest to you. There's also a good discussion on why or why not it would be a good idea.
Just insert a Reverse 1D Array prim before the Index Array and leave the index unwired. The Reverse 1D Array does *not* make a copy of your array... it just annotates the output that this array should be walked backward.
Showing Buffer Allocations seems to imply that the Delete Element primitive does make a copy, even when the Array Output is not connected. Not sure why it would have to though.
Aristos Queue a écrit : Just insert a Reverse 1D Array prim before the Index Array and leave the index unwired. The Reverse 1D Array does *not* make a copy of your array... it just annotates the output that this array should be walked backward.
Yes, this way is well known to me.
Because indexing the last element of an array is a very often used task, my main purpose is to spare as much as possible space on the diagram. Reverse 1D Array takes less place than Array Size + Decrement but still much more than an "all-in one" function would.
What I do is I increment a shift register variable or if there are multiple indices I need to keep track of I have a separate array of indices which I increment every time I add to the array. This approach works for me.
As of LabVIEW 2014, the fastest way to get the last element of an array to use the Delete From Array. In 2012, I apparently found a bug where the DFA did not "stomp" an unwired array output. Some background can be found here: https://lavag.org/topic/16226-new-array-vi/
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
If you use Delete From Array, it will default to removing the last row (ie the "deleted portion" output will be the last row). So if you want the last column, use a Transpose 2D Array before the Delete From Array.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5