[fpc-pascal] Better way to handle callback types
Jonas Maebe
jonas at freepascal.org
Sat Aug 21 20:08:42 CEST 2021
On 21/08/2021 20:06, Ryan Joseph via fpc-pascal wrote:
> type
> generic TSList<T> = class
> type
> TComparator = record
> private type
> TFuncProc = function (constref left, right: T; context: pointer): integer;
> TFuncNested = function (constref left, right: T; context: pointer): integer is nested;
You can pass global functions to "is nested" procvars, so at least these
two don't need to be separate.
OTOH, there's another type: cblocks :)
Jonas
More information about the fpc-pascal
mailing list