This code will fail with:
Internal error: System.AggregateException: Mindestens ein Fehler ist aufgetreten. ---> System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs. bei RemObjects.Elements.Island.IslandOutput.StoreArrayDim(LLVMBaseValue aSelf, LLVMBaseValue[] aInst, Int32 aDim, ArrayExpression aArray) bei RemObjects.Elements.Island.IslandOutput.StoreArrayDim(LLVMBaseValue aSelf, LLVMBaseValue[] aInst, Int32 aDim, ArrayExpression aArray) bei RemObjects.Elements.Island.IslandOutput.StoreArrayDim(LLVMBaseValue aSelf, LLVMBaseValue[] aInst, Int32 aDim, ArrayExpression aArray) bei RemObjects.Elements.Island.IslandOutput.GenerateArrayExpression(ArrayExpression aExpr) bei RemObjects.Elements.Island.IslandOutput.GenerateExpression(Expression aExpr, Boolean aAddress) bei RemObjects.Elements.Island.IslandOutput.GenerateStatement(Statement aSt)
You undef the USEALL it will compile
namespace ConsoleApplication2;
{$GLOBALS ON}
{$define USEALL}
type
TCoeff = array [0 .. 3] of Double;
TCoeffArray = array [0 .. 1, 0 .. 3] of TCoeff;
var
coeffsLow :TCoeffArray :=
[ // 0
[ // 0
[3.85268, -21.229, -0.330434, 0.0127842],
[-1.61486, 0.706564, 0.225945, 0.263682],
[-0.910164, 0.388383, 0.00551445, 0.00671814],
[-0.630184, 0.192402, 0.0098871, 0.0102527]
], // 0
[ //1
[-0.162211, 9.94329, 0.13723, 0.0124084],
[-0.253135, 0.00187735, 0.0230286, 0.01264],
[-0.0695069, -0.0437594, 0.0120636, 0.0163087],
[-0.0328856, -0.00926032, -0.00173573, 0.00527385]
] //1
]; readonly;
type
Testcalc = static class
public
method test;
begin
{$IF USEALL}
var coeffsHigh :TCoeffArray :=
[
[
[0.0899116, -19.2349, -4.11711, 0.183362],
[0.138148, -1.45804, 1.32044, 1.38474],
[0.230903, -0.450262, 0.219963, 0.414038],
[0.0590565, -0.101062, 0.0430592, 0.0204699]
],
[
[0.0164649, 9.89394, 0.0919496, 0.00760802],
[0.0191603, -0.0322058, 0.0134667, -0.0825018],
[0.0156192, -0.017535, 0.00326508, -0.228157],
[-0.0236752, 0.0405821, -0.0173086, 0.176187]]
];
{$ENDIF}
end;
end;
Program = class
public
class method Main(args: array of String): Int32;
begin
// add your own code here
writeLn('The magic happens here.');
end;
end;
end.