Page 1 of 1

Loops with negative numbers

PostPosted: Thu May 05, 2011 7:40 pm
by carlos torres
Dear NB Team

It is possible to use negative numbers wtihin a loop stablishing the step as a new parameter?

ie. Loop "0" "-5" "[MyVar]" "[MyStep]"

where step could be a positive or negative number. Then I can get values from 0, -1, -2, -3, -4, -5

Regards,
carlost

PostPosted: Fri May 06, 2011 5:21 am
by Gaev
carlost:

This works for me ...
Code: Select all
Loop "5" "-1" "[Trace]"
   AlertBox "Loop" "[Trace]"
EndLoop

... returns 5, 4, 3, 2, 1, 0 and -1