Can you embed a while loop inside a while loop?
EDIT: Actually, I just found that you can in the help file, can you explain the proper use of /break and /continue, though
As with most programming languages im assuming that this works the same.
Break will stop the while loop immedtiately.
Continue will stop the current loop but will go back to the top.
Eg:
while (x < 10) {
x = x + 1
print "hi"
break;
print "hello"
}
That will print "hi" once, hit the break and stop.
while (x < 10) {
x = x + 1
print "hi"
continue;
print "hello"
}
That will print "hi" 10 times, but never will display "hello" because the continue will cause it to jump back to the start of the loop.
alias test {
var %i 1
var %x 1
while (%i <= 10) {
%x = 1
while (%x <= 10) {
echo -a %x
inc %x
}
inc %i
}
}
type: /test