Can anyone explain why you can't use variables in the 'step' parameter when doing a negative step.
No problems in normal 'incrementing' loops.
Also using constant negative step values such as -1 or -0.5 work fine.
I presume this is a bug. I am using patch 3.1 by the way.
rem *** all these work ***
print "example 1"
for f=1 to 10 step 2 : print f : next f
print "example 2"
s=2 : for f=1 to 10 step s : print f : next f
print "example 3"
s=2 : for f=1 to 10 step (s*2) : print f : next f
print "example 4"
for f=10 to 1 step -1 : print f : next f
rem *** these don't work ***
print "example 5"
s=-1 : for f=10 to 1 step s : print f : next f
print "example 6"
s=1 : for f=10 to 1 step -s : print f : next f
print "example 7"
s=1 : for f=10 to 1 step (-1*s) : print f : next f
wait key
Gronda, Gronda