Hi all,
In C/C++ the following theory is correct, but does it apply for delphi?
--------------
var
i : integer;
a : array[0..10] of char;
begin
for i:=0 to High(a) do
begin
// some code
end
for i:=High(a) downto 0 do
begin
// some code.
end;
end;
The second for loop would be quicker since "High(a)" is only called once, instead of 10 times.
Thanks,
Richard
In C/C++ the following theory is correct, but does it apply for delphi?
--------------
var
i : integer;
a : array[0..10] of char;
begin
for i:=0 to High(a) do
begin
// some code
end
for i:=High(a) downto 0 do
begin
// some code.
end;
end;
The second for loop would be quicker since "High(a)" is only called once, instead of 10 times.
Thanks,
Richard