Can BlitzMax call a function from a pointer?

BlitzMax Forums/BlitzMax Programming/Can BlitzMax call a function from a pointer?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I think it works.

Declare an OpenGL function to get the pointer to an extension function:
Extern "Win32"
Function wglGetProcAddress:Byte Ptr(lpszProc$z)
EndExtern

Get the pointer to the GL extension function:
Local POINTER_wglSwapInterval : Byte Ptr
POINTER_wglSwapInterval=wglGetProcAddress("wglSwapIntervalEXT")

Declare a function out of the pointer:
Local wglSwapInterval(interval)=Byte Ptr(POINTER_wglSwapInterval)
wglSwapInterval 0

Should the function be declared global so that I can use it anywhere?