For

From Wiki
Revision as of 10:59, 18 August 2005 by 80.222.152.154 (Talk)

Jump to: navigation, search

Synopsis

for {variable} {start} {end}
{
  ...
}

Description

The for command controls a loop that iterates a variable over a range of numbers (both up or down works).

The loop starts assigning the variable with the starting number, there after for each loop it either increments or decrements the variable, until it reaches the ending number.

Example

for %i 1 20
{
	msg %i $
	wait 10
}

See Also

break while continue

Main_Page Documentation Flow Control