Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is wrong with this for/next loop
#2
This is normally how BASIC works.    The Index variable gets changed by STEP (or just +1 if no STEP is specified) at the NEXT.    It happens
one final time when the for loop exits.

Actually by formal definition the variable value is UNDEFINED except during the loop. But what you found is how every BASiC
I've dealt with has actually behaved.
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Exiting sub while inside a loop PhilOfPerth 5 523 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 723 09-03-2025, 11:50 PM
Last Post: fistfullofnails
  Simple Addition gone wrong Dimster 13 1,468 08-22-2025, 09:00 PM
Last Post: Pete
  Either I'm doing MID$( wrong or it has a bug TDarcos 4 813 04-13-2025, 11:14 PM
Last Post: TDarcos

Forum Jump:


Users browsing this thread: 1 Guest(s)