Actions
WHILE in Scol » History » Revision 1
Revision 1/3
| Next »
iri, 09/24/2012 11:59 PM
WHILE in Scol¶
while <condition> do instructions
while <condition> do
(
instruction_1;
instruction_2;
instruction_3;
instruction_n;
);
If the condition is false at the start, the instructions block is never ran.
Example :
fun main ()=
_showconsole;
let 10 -> counter in
while (counter >= 0) do
(
_fooId counter;
set counter = counter-1 // do not forget to increase or decrease your counter, otherwise, the loop can become infinite
);
0;;
License : CC-BY-SA-2.0
Tutorial by iri
Updated by /
Updated by iri about 13 years ago · 3 revisions