For

From Wiki
Revision as of 20:14, 13 August 2005 by Quintok (Talk | contribs) (Synopsis)

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
}