bin mal ein bisserl naiv, könnte es denn mit demda funktionieren (hab' halt nur D7 und da geht das)?
Delphi-Quellcode:
type TMyColors = Array of TColor;
procedure Foo(const colors);
var
i : Integer;
begin
for i := low(tMyColors(Colors)) to high(tMyColors(colors)) do
tMyColors(Colors)[i] := clBlack;
end;
procedure DoIt;
var
Colors : TMyColors;
begin
SetLength(Colors,10);
foo(Colors);
end;
That is perfectly fine and will work, though very not recommended, because after all that, just declare the type, don't leave it untyped, and you will never have a problem with any compiler.