Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Bolt on June 30, 2023, 05:45:03 PM
-
Is there a way to "jump" forward inside a FOR/NEXT loop? Similar to the CONTINUE instruction, but not entirely to the end. Rather, to a defined point in the loop.
-
Maybe roll up everything you want to skip in a subroutine and don't call it on those passes?
-
GOTO/LABEL Spaghetti code at its finest.
Just make sure you don't GOTO a LABEL that is out of the loop (stage, code block, etc.)
-
GOTO/LABEL Spaghetti code at its finest.
Just make sure you don't GOTO a LABEL that is out of the loop (stage, code block, etc.)
Perfect. The help file only showed BREAK, CONTINUE, REPEAT, UNTIL, WEND, WHILE as my options for a FOR Index Loop. GOTO, LABEL however, do link back to FOR, NEXT. I don't think my code will get too spaghetti like with a simple addition to skip partial loop code for certain index ranges.
Thanks!