VarExpr() cannot be statically evaluated

Monkey Forums/Monkey Programming/VarExpr() cannot be statically evaluated

Nobuyuki(Posted 2013) [#1]
Step expressions in For loops must be a constant value...... whyyyyyyy?


Markus(Posted 2013) [#2]
don't know but this works i believe.
	Local c:Int=10
	For Local i:Int=1 To 100
	 Print i
	 i=i+c-1
	Next



ziggy(Posted 2013) [#3]
Use a While in that case.
I'm surprised Monkey allows you to modify the indexer variable on a For loop. I would considere blasphemy! XD


Nobuyuki(Posted 2013) [#4]
hah! The indexer can be modified inside the loop? But Step still must be a static expression, oof :)