Re: "For" keyword not necessary, plus variable types maybe not necessary.
- From: William <william_156@xxxxxxxxx>
- Date: Wed, 23 Jan 2008 00:01:55 +0000
I don't think that would be a left linear grammar. So it would not compile in one pass. Making the compiler slower and more complex.
Among other things it would *** with peoples ability to read the code.
If your goal is stripping down symbols you could get rid of lots of stuff in theory. You don't need a var section. You don't need a begin keyword. You don't need ;s or :s. But compatibility, compilation efficiency and the legibility of your code would suffer....
procedure Main
vIndex
vIndex = 1 to 100
end
end
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.
- References:
- "For" keyword not necessary, plus variable types maybe not necessary.
- From: Skybuck Flying
- "For" keyword not necessary, plus variable types maybe not necessary.
- Prev by Date: Re: Batchfiles, Pipe > Output.txt, Redirection might fail with Unicode text files ?!?!?!
- Next by Date: Re: Binary file byte ordering
- Previous by thread: "For" keyword not necessary, plus variable types maybe not necessary.
- Next by thread: Re: "For" keyword not necessary, plus variable types maybe not necessary.
- Index(es):