While and for are pretty similar, but sometimes you need to do a not recommended thing - change cycle boundaries.
In this situation while and for are different. For calculates boundaries once per run and while calculates boundaries on every iteration.
Consider this code sample:
set x = 5
for i=1:1:x {
write "i: ", i,", x: ", x,!
set x = x+1
}
You'll get this output: