Dumb question - for syntax

dj_d

Member
Does ash support "for" loops, and if so, what's the syntax? It's hard to search for it since for every instance of for being used for looping, their are for or five other uses of the word for for other purposes than the one I'm looking for.

:)
 

Veracity

Developer
Staff member
for x from a to b by c

...is the general case. You don't need to specify whether it's going up or down - although doing so by using upto or downto does allow a runtime check to make sure you didn't screw up.

If you don't specify "c", it defaults to incrementing/decrementing by 1.
 
Top