-
-
Notifications
You must be signed in to change notification settings - Fork 9
Function Pointer Type
IsaacShelton edited this page Mar 21, 2022
·
1 revision
Function pointer types are prefixed with func
, followed by a list of argument types and a return type.
func(ArgType1, ArgType2, ArgTypeN) ReturnType
Function pointer types only support C-style variadic arguments:
printf_pointer func(*ubyte, ...) int = func &printf
Adept-style variadic arguments are not supported in function pointers yet. If you need support for it, please create an issue on github at AdeptLanguage/Adept
so adding support will come sooner rather than later.
Supported prefix modifiers include:
-
stdcall
-stdcall func() void
Functions pointer values can be called like normal functions:
my_function_pointer func() void = func &sayHelloWorld
my_function_pointer()
See Function Pointer Calls for more information