Hello, I was fiddling around with lazarus trying to work out how to obtain the sizes of multidimensional arrays,
I find it is a little counterintuitive, but the following works for a four dimensional array:
myarray: array of array of array of array of integer;
implementation
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
setlength(myarray,3,10,5,2);
//first dimension
label1.caption := inttostr(high(myarray));
//second
label2.caption := inttostr(high(myarray[0]));
//third
label3.caption := inttostr(high(myarray[0,0]));
//forth
label4.caption := inttostr(high(myarray[0,0,0]));
end;
Hope it's useful for someone
regards Albert