On Tue, Apr 27, 2010 at 5:42 PM, Bihar Anwar <bihar_an...@rocketmail.com> wrote: > Just say, I have a dynamic array with size=5, and I want to delete elements > from the index 0 to 2. Is there a trick (the fastest way) to delete those > elements (0 to 2) without moving activities?
You won't do it faster than this: var a: array of string; i : integer; SetLength(a, 5); a[0] := 'aa'; a[1] := 'bb'; a[2] := 'cc'; a[3] := 'dd'; a[4] := 'ee'; a[0]:=a[3]; a[1]:=a[4]; SetLength(a,2); thanks, dmitry _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal