"for (int i=1; i<11; i++)" from C world the "int" is a specific type, not just general loop counter, and could be anything else too.
For who cares it could be "for (float i=1.5; i<12.33; i+=0.6)"
That's the difference with Pascal's for. In those languages, for loop is a syntactic sugar for while loop. In Pascal, for can do what while can't do, so does the other way around.
(Object) Pascal for-loop is not C for() in a few ways (where C for-loop is indeed a sugar over while):
* the number of iteration is estimated once and prior to execution of the loop. That might take effect on the efficiency and logic of the code.
for example
for i:=0 to list.Count-1 do
...
and
i:=0;
while i<list.Count-1 do
..
would be act differently if contents of list changes within the loop.
For - loop would execute the "count"-times that was estimated prior to the first iteration, and "while" would check the condition on each iteration of the loop. If "list.Count" is time consuming operation, then for-loop will be even faster.
* in Object Pascal it's not allowed to modify the loop-variable (it was allowed in Turbo Pascal for example)
* With two statements mentioned above, the compiler could optimize the usage of loop variable. For example, if loop variable is not used within the loop.
var
a,b,c: integer;
begin
for i:=0 to 1000 do c:=a+b;
end;
The compiler could actually code the loop as following
for i:=1000 downto 0 do c:=a+b;
The efficiency is gained (for certain CPUs) where comparison to zero instruction is faster than comparing two numbers.
Delphi does such optimization (that might freak-out unprepared developer debugging such optimized loop), FPC doesn't at the moment.