Possible Duplicate:
Pass a multidimensional array as a parameter in Delphi
Hi all, same question as here: Pass a multidimensional array as a parameter in Delphi
but need for another answer.
type
MultiArray = array of array of Integer;
procedure Foo(a : MultiArray);
begin
end;
procedure Bar(a : array of Integer);
var i : Integer;
begin
for i in a do WriteLn(IntToStr(i));
end;
const
a : array[0..2] of Integer = (1, 2, 3);
ma : array[0..1] of array[0..1] of Integer = ((1,2),(3,4));
begin
Bar(a);
Bar([1,2,3]);
//Foo(ma);
end.
I want to pass arrays of different sizes to Foo. If its not possible this way, any 'workarounds'?