How To

I made a loop "continue" function for NX

3

SP4CEBAR 2023-01-02 17:09 (Edited)

"Continue" allows you to skip the current iteration of a loop and continue with the next iteration.
I guess you could use GOTO instead
Anyways:

A=0

DO
  FOR WRAPPER=0 TO 0

    PRINT A
    WAIT VBL

    '"EXIT" BEHAVES AS "CONTINUE"
    IF A>=25 THEN EXIT

    INC A

  NEXT WRAPPER
LOOP


Timo 2023-01-02 17:28

Interesting idea, but for CPU critical loops it’s not ideal because it takes more CPU cycles. In that case GOTO is better.


Log in to reply.