[fpc-devel] Re: Testing for..in feature
florian at freepascal.org
Wed Nov 4 13:37:55 CET 2009
Paul Ishenin schrieb:
> Alexander Klenin wrote:
>> Yet another bug:
>> type T = (a1, b1=5);
>> ch: T;
>> for ch in T do Writeln(ch);
> This is caused by the problem in the for-to loop:
> for ch := Low(T) to High(T) do
> How should I solve the problem in the for-in loop?
> I tried the next way:
> ch := Low(T);
> while ch <= High(T) do
> But it fails the same way.
You can use the rtti generated for those enums.
More information about the fpc-devel