Hairy Pixels <generic...@gmail.com> schrieb am Mo., 20. Juni 2022, 15:32:

> Can anyone explain why this works? TProc is a normal function pointer so
> how did it capture gVar? My understanding is that only nested proc vars
> could do this.
>

Globals don't need to be captured, because they're reachable from any scope.

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

Reply via email to