Dynamic call to functions
By ockley on Tue, 06/28/2011 - 18:13You may come in a situation, where you need to call a function of which you do not know the name. Lets say, you have a swicth, there turns functionality on or off. If the switch is on, you call functionA() and you call functionB() if it's set to off. To do that, you can use the array acces operator (square brackets) to access the function at a specific scope. Take a look at the following:




