[Lazarus] Easiest way to "case" strings

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Mar 26 14:47:23 CET 2009


On Thu, Mar 26, 2009 at 3:33 PM, Alexander Klenin <klenin at gmail.com> wrote:
>>> ...
>>> for item in obj.Items do begin
>>>   ... item ... item ...
>>> end;
>>>
>>> the latter is safer, simpler and more clear code.
>>
>> ehm, what if I want it reversed ?
>
> Reverse iteration might be common enough to warrant a special syntax,
> but in general all non-standard iteration orders should fall back to indexing.

That sucks. :-(  In that case, I'll stick to my home-grown iterators
which gives me a consistent interfaces no matter the
list/container/component class or the direction I want to iterate.


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/




More information about the Lazarus mailing list