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 hackish but I see problems with it.
for i in List.up do
WriteLn(i);
will be possible to transform into
for i in List using Up do
WriteLn(i);
or
for i in List using GetEnumerator(DoUpArgument)
current "for i in List" will be just short form of "for i in List using
GetEnumerator"
Best regards,
Paul Ishenin.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal