Repeat

Syntax

rep [n]
(tab)	statement
(tab)	...
...

 

Can be single line:

rep([n]) statement ...

 

Parts

n - number of times to repeat.

statements - one or more statements (commands).

 

Remarks

Repeatedly executes statements n times. If n is omitted, executes forever.

 

Use break to exit loop. Use continue to skip following statements.

 

rep can be in other block (if, rep, ...).

 

See also : for, foreach.

 

Examples

rep 10
	bee
	1

rep(10) bee; 1

rep
	i+1
	if(i>10) break