RosettaCodeData/Task/Loops-N-plus-one-half/M2000-Interpreter/loops-n-plus-one-half.m2000
2023-07-01 13:44:08 -04:00

27 lines
659 B
Text

Module Checkit {
\\ old type loop
For i=1 to 10
Print i;
If i=10 Then Exit For
Print ", ";
Next i
Print
\\ fast type loop. Continue exit block, without breaking loop.
For i=1 to 10 {
Print i;
If i=10 Then Continue
Print ", ";
}
Print
Print
i=0
{
loop \\ this mark block for loop, each time need to mark
i++
Print i;
If i=10 Then Exit ' so now we use exit to break loop
Print ", ";
}
Print
}
Checkit