[Gambas-user] Bug in for..next cycle with negative step?

PV oreip at ...1...
Mon Sep 12 13:44:49 CEST 2005


On 10/09/2005 13:55, Laurent Carlier wrote:
> try the following project
> 
> regards,
> 

To further clarify the problem I found with the negative step in a for..next 
loop, I have to say that I made a little confusion.

In fact, the problem showed up in my code when I used something like this

DIM i as Byte

FOR i = 10 TO 1 STEP -1
   [do something]
NEXT

However, I posted a message to the ML stating incorrectly that the variable 'i' 
was declared as Integer, but instead with an Integer variable everything seems 
to work just fine.

So the bottom line is that with a Byte variable in a for..next loop with a 
negative step, my code still doesn't work properly.

Sorry for the (possible) confusion :)
Piero




More information about the User mailing list