On Thu, Mar 26, 2009 at 2:21 PM, Marco van de Voort <[email protected]> wrote: >> var >> i: integer; item: TItem; >> ... >> for i := 0 to obj.ItemCount do begin >> item := Items[i]; >> ... item ... item ... >> end; > > Minus one btw.
And my iterator case is proven. :-) Like I said earlier - one of the reasons I implemented iterators for all list/container classes I use. No need to remember -1 in the if... line or the 0-based vs 1-based etc... Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
