37 lines
832 B
Text
37 lines
832 B
Text
|
|
Module Checkit {
|
||
|
|
\\ A For {} loop
|
||
|
|
For i=1 to 10 {
|
||
|
|
Print i;
|
||
|
|
if i mod 5 Else Print : continue
|
||
|
|
Print ",";
|
||
|
|
}
|
||
|
|
Print i=11
|
||
|
|
\\ A For Next loop
|
||
|
|
For i=1 to 10
|
||
|
|
Print i;
|
||
|
|
if i mod 5 Else Print : continue
|
||
|
|
Print ",";
|
||
|
|
Next i
|
||
|
|
Print i=11
|
||
|
|
\\ A for loop using a block and a Loop statement
|
||
|
|
i=0
|
||
|
|
{ i++
|
||
|
|
if i>10 then Exit
|
||
|
|
loop
|
||
|
|
Print i;
|
||
|
|
if i mod 5 Else Print : continue
|
||
|
|
Print ",";
|
||
|
|
}
|
||
|
|
Print i=11
|
||
|
|
\\ as above but end value for i=10 not 11
|
||
|
|
i=0
|
||
|
|
{ i++
|
||
|
|
if i<10 then loop
|
||
|
|
Print i;
|
||
|
|
if i mod 5 Else Print : continue
|
||
|
|
Print ",";
|
||
|
|
}
|
||
|
|
Print i=10 ' not 11 but 10
|
||
|
|
}
|
||
|
|
Checkit
|