On Mon, 14 Oct 2019 07:37:38 +0200
Sven Barth via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:

>[...]
> Because the iterator returns a Pointer and not whatever you think it 
> might return. If you know it's something else, you cast that inside
> the loop.

I agree with Sven.

What about the other way round?

For example this is allowed: TControl(aButton):=aControl;
This works also when passing something to a "var" argument.

It would be consistent to allow it as the for-in-loop variable.

Mattias
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to