How to call function sequentially ?

You could do it with a switch/case, or you could do it with an array of function pointers.