> What's the best way to implement a shift register? I tried something
> like this, but it wasn't working right. With the way that LabView
> handles strings, I'd like to make sure that I am, in fact, overwriting
> the same memory and not just using up the heap.
>
The shift register probably isn't the issue. It is merely the best
method for getting data that is an output of a loop diagram to be an
input to the next iteration. Frequently, you will want the first loop
diagram to have an empty value or some other known value and you will
wire the value into the outside left of the shift register. Other times
you will want to "maintain" the data from the last time the loop is run,
and at that point, you can leave the left outsid
e unwired.
The way that memory usage grows and grows is when the inside of the
appends or concatenates data and uses a shift register to make it the
input the next iteration. If the logic inside the loop doesn't have any
way of limiting the size of the string or array, then the application
may eventually use so much memory that the application cannot continue.
So, in general, the shift register is one part of the equation, but only
when it is combined with a concatenate or append.
Greg McKaskle