Byte Ptr -> Function

BlitzMax Forums/BlitzMax Programming/Byte Ptr -> Function

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.

Umm, yea, it is a problem if you want to use function pointers because you can only copy the pointer to another function defined with the same number of parameters.

(I'm also seeming to find that Int(Int) is how BlitzMax refers to a function pointer - an int pointer)

Maybe you can have seperate versions of your function, one each for a given number of parameters, and call the appropriate one.

Or maybe instead of having varying parameters being passed, you can set up an array of parameters and just pass two paramaters to the function - array pointer and number of elments. That way the function can always take 2 parameters - needing only one function. You would put all your variables in the array and pass the pointer to it which the function then deciphers.