Sven Barth via fpc-pascal wrote:
"However assigning a nested function variable to a function reference is much harder. Assigning a function reference to a nested function variable is hard as well. "
"is nested" means that the actual function passed can be either global or local. ISO Pascal style function parameters are implicitely "is nested". The formal function reference for an "is nested" function contains space for both a function address and a context pointer. The context pointer is NIL if the actual function is declared global. For local functions, the context pointer typically contains a dynamic link chain pointer, required to address variables in the actual link frame. For object methods, the context pointer is the SELF pointer.
Regards, Adriaan van Os _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal