type
TFixedSizeArray = array [0..9] of Integer;
TDynamicArray = array of Integer;
procedure SomeProc(fixed : TFixedSizeArray; dynamic : TDynamicArray);
begin
fixed[0] := fixed[0] + 1;
dynamic.SetLength(20);
dynamic[0] := fixed[0] + dynamic[0];
end;
procedure TForm1.W3Button3Click(Sender: TObject);
var f : TFixedSizeArray;
d : TDynamicArray;
begin
f[0] := 100;
d.SetLength(10);
d[0] := 50;
SomeProc(f, d);
ShowMessage(IntToStr( f[0]) ); //100
ShowMessage(IntToStr( d[0]) ); //151
end;
|