[fpc-pascal] Forin Test
Paul Ishenin
webpirat at mail.ru
Sun Nov 8 05:02:10 CET 2009
Dariusz Mazur wrote:
> with hack with trivial operator we receive the same:
> for CollectionElement in Collection.CollectionEnumerator do
yes, but it is still the hack
> but what about
> for CollectionElement in Collection using TreeEnumerator do
> where TreeEnumerator cant traverse thought Collection
Well, TreeEnumerator must be a method of Collection instance to do this
of course. If it exists then it is used.
> But I have another proposition. Because we add so many variants to
> forin construction, can be added once more.
> [example]
> for list do ....
> [/example]
>
> where we omit in keywords and iteration variable
If we ommit the 'in' keywork then it is not a 'for-in' loop, so I am not
responsible :)
Best regards,
Paul Ishenin.
More information about the fpc-pascal
mailing list