hmmm......

a simple while loop is like this

var %thinga = 1
while (%thinga <= 10) {
echo %thinga
inc %thinga
}

depending on if the variable will inc (increase) or dec (decrease) it really depends on what your trying to do.