Re: "For" keyword not necessary, plus variable types maybe not necessary.



Skybuck Flying wrote:
Hello,

Following code could work:

procedure Main;
var
vIndex;
begin
vIndex := 1 to 100 do
begin

end;
end;

The to and do keywords should be enough for the compilers to figure out it's a for loop

The numbers indicate it should be some kind of integer so take the integer that will fit.

No need to write lengthy code like:

procedure Main;
var
vIndex : integer;
begin
for vIndex := 1 to 100 do
begin

end;
end;

Bye,
Skybuck.



you don't need to write lengthy code like 'begin' or 'end' either. why not '{' and '}'?
.



Relevant Pages