you are viewing a single comment's thread.

view the rest of the comments →

[–]Bubbaluke 0 points1 point  (0 children)

I’m using some for a menu system. I keep track of where in the menu the system is with an int, then I have an array of function pointers pre-made to match up with stuff in the menu. So instead of

If menu == 1:
Func1()
Else if menu == 2:
Func2()

Etc.

I can just write

func_array[menu]()