On Tue, Oct 20, 2009 at 19:22, Graeme Geldenhuys <graemeg.li...@gmail.com> wrote: > 2009/10/20 Alexander Klenin <kle...@gmail.com>: >> >> Well, I suggest you to read at least the link provided in the original post, >> and maybe also some documention about Delphi/C# enumerators. > > > I just read the docs in the lazarus wiki. The problems/limitations > still hold true. For-in only goes in ONE direction
Hm, did you read the about reverseEnumerators and various irders of tree traversals? > and can't peak That is true, but this is required in maybe 1% of the cases, or even less. For these cases, certainly slightly longer while loop is justified. > filter returned results etc.. Well, there is no such sample currently on the wiki, but it is still quite possible. > What good is an enumerator that only ever goes in one direction and > visits all items. That's not a very flexible design. Please read again with more attention ;-) -- Alexander S. Klenin _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel