Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there breaks and continues for loops like in other languages? #37

Open
PuppyPi opened this issue May 20, 2021 · 2 comments
Open

Are there breaks and continues for loops like in other languages? #37

PuppyPi opened this issue May 20, 2021 · 2 comments

Comments

@PuppyPi
Copy link

PuppyPi commented May 20, 2021

Are there breaks and continues for loops like in other languages?
I can't remember any but maybe my memory is holey!

(For clarity and posterity, if someone only knows caos (no worries :3 ), break and continue jump to the end or beginning of a loop. Like, if you use the "break" command, the next line to be executed is the one after the UNTL or NEXT or REPE or whatever :3, and if you use "continue" then it jumps immediately to the next iteration of the loop, skipping anything after it and starts over right after the LOOP or ENUM or REPS or whatever :3 )

@Vermidia
Copy link
Member

You do have to finish an enum with a NEXT, but you're only allowed to have the 1 NEXT, and SUBR can only have 1 RETN, REPS only 1 REPE, LOOP can only have 1 UNTL or EVER etc. So for loops, there's no real breaks or continues without stopping the script itself.

@PuppyPi
Copy link
Author

PuppyPi commented May 20, 2021

And there's no other loop-related commands I'm forgetting?
(I don't see any in the docs I just want to make sure)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants