Command: for

Syntax

for <ident> = <start> , <limit> {,<inc>}
   <command_block>

Description

Loop through one or a block of commands controlled by a numeric variable.

Parameters

Switches

None

Notes

For loops may be downward by giving inc a negative value.

A jump to the end of the for loop may be made with the continue command.

A break out of the for loop may be made with a break command.

Examples

Loop of one command.

for x=1,10; array[x] = 5.5

Loop of a command block.

for y=1,10,2 {
    x = y * y
    tell <'X,Y have values',x,y>
}

See Also

Commands:

break, continue, loop,