> On Oct 15, 2019, at 5:26 PM, Benito van der Zander <[email protected]> wrote:
>
> you could do
>
> var
> it: pointer;
> obj: TObject absolute it;
> begin
> for it in list do
> begin
> // continue on like before using “obj” instead of “it"
> end;
>
That is a clever solution but it’s basically a sneaky trick around the
compilers excessively strict typing. The programmer knows the correct type but
there’s no way to tell that to the for loop.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal