Darkhog Posted May 30, 2018 Share Posted May 30, 2018 So if expr is a number, at 0 it will go to the first label, at 1 it will go to second label and so on, right? Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted May 30, 2018 Share Posted May 30, 2018 Right. It's a typical "jump table" using the expression value as an index. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted May 30, 2018 Share Posted May 30, 2018 There is also another idiom: "ON Frame GOTO..." Thai one takes a single routine to call on every frame event. Quote Link to comment Share on other sites More sharing options...
Darkhog Posted June 8, 2018 Author Share Posted June 8, 2018 I know, I know about the last one. So the On expr... block is kinda like a simple switch statement, only you need to put "case" blocks separately. Gotcha. Will make making a state machine really simple. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 8, 2018 Share Posted June 8, 2018 I know, I know about the last one. So the On expr... block is kinda like a simple switch statement, only you need to put "case" blocks separately. Gotcha. Will make making a state machine really simple. Exactly! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.