« Reply #6 on: February 13, 2026, 10:07:22 am »
program Project1;
{$mode ObjFPC}{$H+}
Var
TArr1:Array Of Byte;
i:Integer;
begin
SetLength ( TArr1, 1 );
TArr1 [ 0 ] := 0;
for i := 0 to ((8*Length(TArr1))-1) do begin
Writeln('Iteration ',i, ' - Value=',Tarr1[0]);
end;
Readln;
end.
Returns
Iteration 0 - Value=0
Iteration 1 - Value=0
Iteration 2 - Value=0
Iteration 3 - Value=0
Iteration 4 - Value=0
Iteration 5 - Value=0
Iteration 6 - Value=0
Iteration 7 - Value=0
If your Code never executes the body of the For-Loop then the Length of your num-array is zero
« Last Edit: February 13, 2026, 10:09:55 am by Zvoni »

Logged
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad