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

Paul Ishenin ip at kmiac.ru
Thu Nov 5 09:20:36 CET 2009


Michael Van Canneyt wrote:
>> 1) check if enum has jumps and give an error
> 
> This is the best solution. There are many other things that don't work 
> with enums
> that have jumps; This is just an additional one.

This is the easiest solution.

> Enums with jumps are just a kludge to mimic C enums, which are in 
> reality just a bunch
> of constants .

Maybe we can improve that enums a bit? I see that compiler gives no way 
to traverse such enums. If you have no info about such type you can't 
work with it properly: succ, pred, inc, dec don't work as expected, 
typeinfo is not present. I think that maybe at least for-in loop can 
work for them :)

You and Florian as well as my left and right cerebral hemispheres give 
me completely different directions. Therefore I stay with the same 
question. I will wait for more opinions.

Best regards,
Paul Ishenin.




More information about the fpc-devel mailing list