Source language: Translate to:

Loops with negative numbers

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Loops with negative numbers

Postby carlos torres » Thu May 05, 2011 7:40 pm

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
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia

Postby Gaev » Fri May 06, 2011 5:21 am

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
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBook Suggestions

Who is online

Users browsing this forum: Bing [Bot] and 2 guests