I can see a way to bypass this error, but the design seems unintuitive… and inconsistent. Because code doesn’t work that way, this means there must be a failure of my understanding.
The error I’m getting is
line 28 of startup: It is illegal to fall in to *else statement; you must *goto or *finish before the end of the indented block.
Code demonstration below. The goodCalc function uses what appears to be a superfluous *goto/*label to evade the error, badCalc does not, longCalc has a thing that determines whether to check
*title Testbed *author Admin *create testInt 10 *create testBool true It is apparent that testInt is *gosub badCalc . It is apparent that testInt is *gosub goodCalc . It is apparent that testInt is *gosub longCalc Test complete. *finish
In the same file, below, but broken apart in the post for visibility:
*comment Functions section *label badCalc *if testInt >= 10 >=10 *else <= 9 *return *label goodCalc *if testInt >= 10 >= 10 *goto BUTWHY *else <= 9 *goto BUTWHY *label BUTWHY *return *label longCalc It is apparent that testInt is *if testBool *if testInt >= 10 >= 10 *elseif testInt >= 6 >= 6 *elseif testInt >= 4 >= 4 *elseif testInt >= 2 >= 2 *elseif testInt >= 1 = 1 *else <= 0 *else not selected yet. *return
Further testing yielded another functional one:
*label returnCalc *if testInt >= 10 >= 10 *return *else <= 9 *return
However, this does me no good if I want to run the *if in-line rather than as a function…
(Oh cool I won’t be so awful at formatting my posts anymore, I found the thing to increase the size of the input box.)