Both sides previous revision Previous revision | |||
hpl2:tutorials:script:funcdef [2011/08/14 20:53] apjjm [Solving a basic problem with function pointers] |
hpl2:tutorials:script:funcdef [2011/08/15 01:09] (current) apjjm [Solving a basic problem with function pointers] |
||
---|---|---|---|
Line 158: | Line 158: | ||
void bigFunction() { | void bigFunction() { | ||
@outputChoice = @output1; // Initially point to output 1 | @outputChoice = @output1; // Initially point to output 1 | ||
- | subFunction(); // Call whith 1/4 chance of changing outputChoice | + | subFunction(); // Call with 1/4 chance of changing outputChoice |
outputChoice(); // Call whichever output has been chosen | outputChoice(); // Call whichever output has been chosen | ||
} | } |