How to pass various function to TYPE??

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

orgos(Posted 2006) [#1]
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??


Chris C(Posted 2006) [#2]
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


Robert(Posted 2006) [#3]

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.


Chris C(Posted 2006) [#4]
@robert - very good point!


ImaginaryHuman(Posted 2006) [#5]
You can just pass function pointers to the function and then it can call them. That's what they're for.