-
-
Notifications
You must be signed in to change notification settings - Fork 21
Function Pointer Types
CD2 edited this page Feb 8, 2023
·
2 revisions
You can define a global function pointer with the func keyword.
void f(){}
func $void() fp = f;
You can define member function pointers with the method keyword. What member function it is depends on where it is defined.
&C
{
void f(){}
method $void() fp = f;
}
You can define an anonymous function pointer with ~.
void f()
{
~$void() fp = [void(){}];
}