[fpc-devel] Re: Testing for..in feature

Paul Ishenin webpirat at mail.ru
Wed Nov 4 13:36:33 CET 2009


Alexander Klenin wrote:
> Yet another bug:
>
> ---
> type T = (a1, b1=5);
> var
>   ch: T;
> begin
>   for ch in T do Writeln(ch);
> end.
>   
This is caused by the problem in the for-to loop:

for ch := Low(T) to High(T) do
   WriteLn(ch)

How should I solve the problem in the for-in loop?

I tried the next way:
  ch := Low(T);
  while ch <= High(T) do
  begin
    WriteLn(ch);
    inc(ch);

But it fails the same way.

Best regards,
Paul Ishenin.



More information about the fpc-devel mailing list