[fpc-devel] for .. in documentation and classes based iterators.
Marco van de Voort
fpc at pascalprogramming.org
Tue Sep 3 12:04:28 CEST 2019
I did an initial patch to add for..in iterator support in fcl-stl
I've looked at the docs of for..in, and it doesn't seem to name the
delphi getenumerator() method in its options. I assume it is equal to
point 5, the enumerator operator, because a for..in this way doesn't
cause a memory leak.
"5. Any type for which an enumerator operator is defined. The enumerator
operator must return a structured type that implements the IEnumerator
interface. The type of the control variable’s type must equal the type
of the enumerator’s GetCurrent return value type."
but maybe that could be said more explicitly?
More information about the fpc-devel