I would like to write a function as below. I would also like to tell one more thing. The statemets inside the looping function is not same in all the case. I can be anything like conditional statements, DB manupulations, etrc....The loop function should take those statements as input and loop it.
case 1:
loop(10) {
//some set of statements.
}
case 2:
loop(10) {
//Not the same set of statements as in case 1.
}
I would like to know how to define the function loop to accomlish the functionality.
Any one could help me please..