Embarcadero Delphi Simple for loop


Example

A for loop iterates from the starting value to the ending value inclusive.

program SimpleForLoop;

{$APPTYPE CONSOLE}

var
  i : Integer;
begin
  for i := 1 to 10 do
    WriteLn(i);
end.

Output:

1
2
3
4
5
6
7
8
9
10