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
Paul Ishenin pisze:
Of course. for-in loop expect to have a collection not an enumerator.
What enumerator should for-in loop to choose in the next case:
[example]
TMyListEnumerator = class
public
function GetEnumerator: TMyListEnumeratorEnumerator;
function MoveNext: Boolean;
property Curren
Dariusz Mazur wrote:
Can You give example of this:
where
for i in List using GetEnumerator
is better than
for i in List.GetEnumerator
Of course. for-in loop expect to have a collection not an enumerator.
What enumerator should for-in loop to choose in the next case:
[example]
TMyListEnumerat
Paul Ishenin pisze:
Dariusz Mazur wrote:
Where?
Its work now with current compilator. Are You plan to disable this?
I made a typo: read 'I see *no* problems with this'.
for i in List using GetEnumerator(DoUpArgument)
current "for i in List" will be just short form of "for i in List
using Ge
Dariusz Mazur wrote:
Where?
Its work now with current compilator. Are You plan to disable this?
I made a typo: read 'I see *no* problems with this'.
for i in List using GetEnumerator(DoUpArgument)
current "for i in List" will be just short form of "for i in List
using GetEnumerator"
But thi
Paul Ishenin pisze:
darekm wrote:
I've play with forin construction. To my work I need more than one
per collection.
In attach is one of example program.
Can someone review it. is this proper construction.
operator enumerator (AEnumerator: TEnumerator): TEnumerator;
begin
Result := AEnumerato
darekm wrote:
I've play with forin construction. To my work I need more than one per
collection.
In attach is one of example program.
Can someone review it. is this proper construction.
operator enumerator (AEnumerator: TEnumerator): TEnumerator;
begin
Result := AEnumerator
end;
It is a bit h