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

Werner werda at ...1000...
Sat Sep 10 07:20:29 CEST 2005


Charlie Reinl wrote:

>>PV wrote:
>>
>>    
>>
>>>Hi all,
>>>
>>>I just noticed this doesn't work
>>>
>>>DIM i as Integer
>>>
>>>FOR i = 10 TO 1 STEP -1
>>>  PRINT "ciao"
>>>NEXT
>>>
>>>The loop is exited immediately, so no "ciao" is printed.
>>>
>>>Is this a bug or have I missed some syntax changes in the devel
>>>version? (by the way, I'm using 1.9.20).
>>>
>>>
>>>Take care,
>>>Piero
>>>
>>>Doesn't seem to work in 1.0.10 either
>>>      
>>>
>>Werner
>>    
>>
>
>Salut,
>
>on my box no pb.
>Using:
> - gambas-1.0.10  (downloaded, (no more) from the gambas-shrine)
> - X Window System Version 6.8.2 Release Date: 9 February 2005
>  X Protocol Version 11, Revision 0, Release 6.8.2
>  Build Operating System: Linux 2.6.8-gentoo-r3 i686 [ELF]
>  Current Operating System: Linux gentoo01 2.6.8-gentoo-r3 #1 SMP
>   Sun Feb 13 21:57:11 CET 2005 i686
>- gentoo 1.4 (last Updated 02.07.2005) on Gentoo Base System version
>1.4.16
>- Qt: 3.3.4
> - KDE: 3.4.1
> - gcc (GCC) 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1,
>ssp-3.3.5.20050130-1,    
>pie-8.7.7.1)
> - mysql  Ver 12.22 Distrib 4.0.24, for pc-linux-gnu (i686)
> - psql (PostgreSQL) 8.0.1
> - SQLite version 2.8.15
> - GNU Make 3.80
>
>I'v 10 ciao printed to the console
>
>Amicalment
>Charlie
>  
>
Interesting, that. I tried again with the for loop as the first 
statements in a project and then it worked.

Werner





More information about the User mailing list