[fpc-devel] New feature discussion: for-in loop

Michael Van Canneyt michael at freepascal.org
Thu Oct 22 14:40:22 CEST 2009



On Thu, 22 Oct 2009, Paul Ishenin wrote:

> Michael Van Canneyt wrote:
>> 
>> Don't forget the remark by Sergei Gorelkin, that in fact a single
>> call could be enough.
> In fact a single call could not be compatible with delphi solution.

That is so, but none of what is discussed is compatible with Delphi, 
since Delphi uses hardcoded names, so in Delphi mode you'll have to 
add some separate checks anyway.

In objfpc code, the single call could be enough.

In each case, you'll always need 2 calls: 1 call in class itself to
Create Iterator instance, and the iterator call in the iterator instance.

I suggest you think about it when writing the specs, then we can discuss
further...

Michael.



More information about the fpc-devel mailing list