Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is wrong with this for/next loop
#1
When I type this in
For i% = 1 To 5
    Print i%
Next
Print i%

I get when I run it:
1
2
3
4
5
6

Seems like it should be 5 not 6.

Why is i%  6 after it comes out of the for/next loop?
I am running QB64e under fedora linux.  Not sure how to find the version number, but the installation files all have 12/13/2024 as the date modified on them so it isn't an old version.
Reply


Messages In This Thread
What is wrong with this for/next loop - by Helium5793 - 04-14-2025, 01:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Exiting sub while inside a loop PhilOfPerth 5 525 12-05-2025, 09:40 AM
Last Post: PhilOfPerth
  Do Loop, Sleep and Mouse Button Dimster 5 599 09-06-2025, 12:57 PM
Last Post: Dimster
  Using modulo to loop through lists fistfullofnails 3 725 09-03-2025, 11:50 PM
Last Post: fistfullofnails
  Simple Addition gone wrong Dimster 13 1,475 08-22-2025, 09:00 PM
Last Post: Pete
  Either I'm doing MID$( wrong or it has a bug TDarcos 4 822 04-13-2025, 11:14 PM
Last Post: TDarcos

Forum Jump:


Users browsing this thread: 1 Guest(s)