Function name in variable

BlitzMax Forums/BlitzMax Beginners Area/Function name in variable

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.

You could send an event and put the (string-)name of that function in the .extra field. Then you should have the function listen to events (eventhooked), if the function spots 'the name of the function' then you execute it.
This is a way where you never have to do large select-case constructions.

The select-case option is ofcourse also valid but you'll keep updating that code if your function count grows.

Select s$
Case "DoThis"
DoThis ' <- function call
Case "DoThat"
DoThat ' <- function call
EndSelect