ID:272979
 
So im creating a resting verb I remember how the while proc works, but i forgot how to loop it. So example code below

mob/proc/Rest
while(tag)
if()//the resting stuff
//nice bit of + and stuff
//now how do i loop back to tag
else
//oooo lets break it with a nice return
return
continue
Wouldn't you want "while(tag && the resting stuff)"?
While procs automatically loop back. That's why it's called a loop. The continue keyword is for forgetting the rest of the loop stuff and manually starting the loop over.
//Anatomy of while(), and pretty much for() too:
LOOP //label
if(condition)
//do stuff

//continue keyword, can be found anywhere in the block
goto LOOP

//break keyword, can be found anywhere in the block
goto ENDLOOP

//end of the block
goto LOOP
//if the condition isn't true, fall out of the code block by not going back to LOOP
ENDLOOP
In response to Kaiochao
Ah thankyou Kaiochao really helpful.