Hi guys
A question that I have had for a long time:
Suppose I have the variable
list:TStringList
and I want to iterate through the items through the items in list.
Between the construction:
For i := 0 to list.Count - 1 do
begin;
commands
end;And the construction
j := list.Count - 1;
For i := 0 to j do
begin;
commands
end;Which would be the most efficient?
I ask because I have the impression that in the first construction it will be necessary to generate code to determine the value list.Count - 1 at each iteration of the For loop.
Greetings from S?o Paulo - Brazil
Ar? Ricardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240728/5d6aa406/attachment.htm>
