[fpc-devel] New feature discussion: for-in loop

Micha Nelissen micha at neli.hopto.org
Tue Oct 20 10:55:48 CEST 2009


Michael Van Canneyt wrote:
> And you cannot change I manually during the loop.
> 
> You don't know this with an iterator since you depend on the implementation
> of the iterator. The loop could loop forever then...

Maybe the iterator function should be a "const" function. A const 
function is not allowed to change the class members it's operating on.

Micha



More information about the fpc-devel mailing list