On Thu, Mar 26, 2009 at 3:33 PM, Alexander Klenin <[email protected]> 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/

_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to