Quote:
Originally Posted by Shatterhand
Any ideas if its possible to implement something like this?
|
Yes, it is definitely possible. The question is how... In c I'd create an array of function pointers and call those.
Ultimately its just an array of memory addresses which you jump to.
I think this is what you want
Code:
On Expression Goto|Gosub Program Label[,Program Label...]
On allows a program to branch, via either a Goto or a Gosub, to one of a number of
Program Labels depending upon the result of the specified Expression.
If the specified Expression results in a 1, then the first Program Label will be
branched to. A result of 2 will cause the second Program Label to be branched to and
so on. If the result of Expression is less than one, or not enough
Program Labels are supplied, program flow will continue without a branch.