How do I create an array of x integers without creating / defining the x integers. This example will create a 10 integer array (pre-populated with zeros in each element):
var
IntArray : TArray<Integer>;
begin
IntArray := TArray<Integer>.Create(0,0,0,0,0,0,0,0,0,0);
end;
So I created an array of integers that is 120 integers long, which started to look messy:
IntA := TArray<Integer>.Create(
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0);
And now I need to create an array of 9000 integers, and I don't need (or want) to pre-populate the array with 9000 zeros.
Is there a command like:
IntA := TArray<Integer>.Array[0..9000]; //This doesn't work
Thanks.