For - Geomol/World GitHub Wiki

Usage

for 'word start end bump body

Description

Evaluates a block over a range of values.

for is a function!

Arguments

word -- Variable to hold current value [word!]
start -- Starting value [integer! real! percent! char!]
end -- Ending value [integer! real! percent! char!]
bump -- Amount to skip each time [integer! real! percent! char!]
body -- Block to evaluate each time [block!]

Special attributes

throw

Examples

w> for i 1 10 2 [print i]
1
3
5
7
9
w> for i 2% 12% 3% [print i]
2%
5%
8%
11%