for (roll option)

From RPTools Wiki
Revision as of 04:12, 5 April 2009 by Verisimilar (talk | contribs)
Jump to navigation Jump to search

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

FOR Option

Introduced: Version 1.3.b46

Executes a statement for a number of iterations based on a start and end value.

Usage

[FOR(var, start, end): body]
[FOR(var, start, end, stepsize): body]
[FOR(var, start, end, stepsize, separator): body]

The var variable counts from start to end during the loop. The optional stepsize (default +1) is added to var at each iteration.

Example

[FOR(i,10,0,-2): "i is now " + i]

Counts down even numbers from 10 to 0.