Array Dyn - Delete method



Array Dynamic - Delete method
Smart pascal source code
var i: Integer; numbers: array of Integer; Begin numbers.add(3); numbers.add(0); numbers.add(1); numbers.add(2); numbers.Delete(numbers.IndexOf(3)); for i := 0 to numbers.High do WriteLn(numbers[i]); type TArray = array [0 .. 1] of String; var av: array of TArray; var buf: TArray := ['a', 'alpha']; av.add(buf); buf := ['b', 'beta']; av.add(buf); buf := ['g', 'gamma']; av.add(buf); av.Delete(0); for i := 0 to av.High do WriteLn(av[i][0] + ' - ' + av[i, 1]); buf := ['a', 'alpha']; av.add(buf); av.Delete(0, 2); for i := 0 to av.High do WriteLn(av[i][0] + ' - ' + av[i, 1]); { <<< CONSOLE OUTPUTS >>> 0 1 2 b - beta g - gamma a - alpha } end;