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

Paul Ishenin ip at kmiac.ru
Thu Nov 5 07:04:44 CET 2009

Alexander Klenin wrote:

>> 4) write 2 magic functions: one to get the next enum value, one to get the
>> previos enum value and implement a special handling in the for-in loop for
>> such arrays
> I always thought Succ/Pred are exactly such magic functions ;-)

Btw, I tested succ, pred with delphi and with fpc in mode delphi.

   T = (a1, b1 = 5);
   ch: T;
   ch := a1;

How do you think what is the output :) Answer: '1'

So succ/pred works another way we need.

Best regards,
Paul Ishenin.

More information about the fpc-devel mailing list