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 _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel