make_array_of_array_of_array

EXPRESS specification:

FUNCTION make_array_of_array_of_array
(* New for LPM/6 *)(lis : LIST[1:?] OF LIST [1:?] OF LIST [1:?] OF GENERIC : T; low1, u1, low2, u2, low3, u3 : INTEGER): ARRAY OF ARRAY OF ARRAY OF GENERIC : T; LOCAL res : ARRAY[low1:u1] OF ARRAY [low2:u2] OF ARRAY[low3:u3] OF GENERIC : T; END_LOCAL; (* Check input dimensions for consistency *) IF (u1-low1+1) <> SIZEOF(lis) THEN RETURN (?); END_IF; IF (u2-low2+1) <> SIZEOF(lis[1]) THEN RETURN (?); END_IF; (* Initialise res with values from lis[1] *) res := [make_array_of_array(lis[1], low2, u2, low3, u3) : (u1-low1 + 1)]; REPEAT i := 2 TO HIINDEX(lis); IF (u2-low2+1) <> SIZEOF(lis[i]) THEN RETURN (?); END_IF; res[low1+i-1] := make_array_of_array(lis[i], low2, u2, low3, u3); END_REPEAT; RETURN (res);
END_FUNCTION;