On 14/06/07, Bram Kuijvenhoven <[EMAIL PROTECTED]> wrote:

Daniël Mantione wrote:
>
> Op Thu, 14 Jun 2007, schreef Florian Klaempfl:
>
>> Graeme Geldenhuys schrieb:
>>> I like the "for-in" code.
>> Using the default property is clean, using count imo not. Thought I
>> admit I've no idea so far to do it better.
>
> Well, there already is a ";default;" directive, we could add a
";counter;"
> directive.

where GetIterator must return e.g. an IIterator interface, which is then
to be defined in Objpas or the like, much like IUnkown.


The iterator approach is the most neutral. It can be implemented for any
type of structure, even those that do not necessarily have integer indexes.
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to