I would use something like this
Code:
type
TMatri = array of array of Integer;
TMatrixArr = array of TMatri;
var
M: TMatrixArr;
i, j, k: Integer;
const
DIM1 = 3;
DIM2 = 4;
DIM3 = 5;
begin
SetLength(M, DIM1);
for I := Low(M) to High(M) do // or // for i := 0 to DIM1-1 do
begin
SetLength(M[i], DIM2, DIM3);
for j := 0 to Pred(DIM2) do // or // for j := 0 to DIM2-1 do
for k := 0 to Pred(DIM3) do // or // for k := 0 to DIM3-1 do
M[i][j, k] := Abs(k - j);
end;
I think accessing such nested data with M[i][j, k] easier to read and write.