How to pass various function to TYPE??

BlitzMax Forums/BlitzMax Programming/How to pass various function to TYPE??

Hello.

I have a "Type", inside the type, I have various function to perform depending the actions, then I need pass a parameter to function "makeActions()", the parametres must be the names of other functions to execute or something like it.

Any idea??

I'm not too sure, but is it possible to do an array of function pointers?

Other than that you could use a select statement to call a list of functions


I have a "Type", inside the type, I have various function to perform depending the actions, then I need pass a parameter to function "makeActions()", the parametres must be the names of other functions to execute or something like it.



I think it may help if you step back from the details and explain at a higher level what you are trying to do. There may be a neater method for doing what you are after.

@robert - very good point!

You can just pass function pointers to the function and then it can call them. That's what they're for.