View Single Post
Old 10 June 2018, 10:45   #121

Join Date: Jul 2016
Location: Darmstadt
Posts: 759
Originally Posted by Shatterhand View Post
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
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.
E-Penguin is offline  
Page generated in 0.06833 seconds with 11 queries