Op Sat, 26 Jan 2013, schreef Alexander Klenin:

With this in mind, consider a user who wants to iterate over the
following array:

var
 a: array [1..5] of Integer = (1, 2, 9, 4, 5);

In my proposal, he should write:
var
 v, i: Integer;
begin
 for a in a index i do
   Writeln(i, ' ', v);
end.

Well... I fail to see the improvement over old fashioned:

for i:=low(a) to high(a) do
  writeln(i,' ',a[i]);

Daniël
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to