[fpc-devel] New feature discussion: for-in loop
Micha Nelissen
micha at neli.hopto.org
Mon Oct 26 22:08:06 CET 2009
Vinzent Höfler wrote:
> At first, "const function" would tell us that the function does not change the object in any way, right?
What is "the object"? Usually there are 2 objects: the list (TList e.g.)
and the object being iterated, e.g. TList.Objects[I]. Those referenced
objects can be volatile, the const-ness only applies to the TList.
Ideally the iterator state and the state of the items iterated over are
separated. (Maybe this is not so with e.g. TStringList).
Micha
More information about the fpc-devel
mailing list