I keep ADC samples in Samples: array of Integer. To filter them I wrote Work := Samples; and modified Work, and found the original data changed as well. With strings the same kind of assignment never affected the original. I also build the array by calling SetLength(Samples, Length(Samples) + 1) for each new sample, and I need to delete elements from the middle.
How do assignment, SetLength and deletion really work for dynamic arrays, and what is the efficient way to grow one?




