[Lazarus] Easiest way to "case" strings

Marco van de Voort marcov at stack.nl
Thu Mar 26 21:37:24 CET 2009


On Thu, Mar 26, 2009 at 02:41:13PM +0200, Graeme Geldenhuys wrote:
> >> ?? 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...

You snipped this:

No, since for all common usage patterns based the IDE codetools creates the
pattern for you.




More information about the Lazarus mailing list