You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IsaacShelton edited this page Mar 21, 2022
·
1 revision
Function Pointer Type
Function pointer types are prefixed with func, followed by a list of argument types and a return type.
func(ArgType1, ArgType2, ArgTypeN) ReturnType
Variadic Argument Support
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
Supported prefix modifiers include:
stdcall - stdcall func() void
Usage
Functions pointer values can be called like normal functions: