Adds new items (cast instance of type) to the end of an ARRAY



Adds new items (objects) to the end of an array.
Smart pascal source code
type TBase = class public palavra: string end; type TChild = class(TBase) end; //Add in Array a cast instance of type var a: array of TBase; b: TChild; o: TObject; begin b := TChild.Create; b.palavra := 'smart'; a.Add(b); a.Add(TBase(nil)); a.Add(TBase(o)); a.Add((o as TBase)); Writeln(a.Length); // 4