Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Select Case error
#7
What happened that the source code couldn't be posted as ordinary "code" block here?

This is because earlier I kept getting a 502 trying to open the screenshot.

YOU CANNOT USE TWO g VARIABLES in consecutively nested FOR/NEXT loops!

I don't know if QB64 would even permit it. But the outer loop will execute once. It's because the inner one will set that variable to 8, then when the processor goes to the outer "FOR" line, for the same exact variable it thinks, "OK it's 1 to 8 but the value is nine so I give up". :O

Actually the IDE doesn't know what to blame because the programmer failed to close a loop. The two variables for "FOR/NEXT" must have different names, and each loop should be closed properly inside the "CASE" and before "END SELECT".

Change one of the g variables of the loop control, then add another "NEXT" at the bottom, before "END SELECT" statement. Without it, the program will not compile.
Reply


Messages In This Thread
Select Case error - by Dimster - 12-14-2023, 04:39 PM
RE: Select Case error - by NakedApe - 12-14-2023, 04:50 PM
RE: Select Case error - by MasterGy - 12-14-2023, 07:05 PM
RE: Select Case error - by Dimster - 12-14-2023, 05:37 PM
RE: Select Case error - by NakedApe - 12-14-2023, 07:02 PM
RE: Select Case error - by SMcNeill - 12-14-2023, 07:39 PM
RE: Select Case error - by mnrvovrfc - 12-14-2023, 08:08 PM
RE: Select Case error - by SMcNeill - 12-14-2023, 08:59 PM
RE: Select Case error - by Dimster - 12-15-2023, 01:20 PM
RE: Select Case error - by SpriggsySpriggs - 12-15-2023, 03:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mac debugger not connecting, a user error! BlameTroi 0 99 02-07-2026, 06:18 PM
Last Post: BlameTroi
  ERROR MESSAGES COLORS ? aurel 5 385 01-02-2026, 11:26 AM
Last Post: aurel
  Using CONST & _RGB used together seem to error... Dav 12 687 12-12-2025, 12:29 AM
Last Post: Dav
  error doing image collision detection with _MemGet madscijr 55 4,663 10-01-2025, 03:25 PM
Last Post: bplus
  error on function returning _mem Herve 5 683 07-05-2025, 08:06 PM
Last Post: hsiangch_ong

Forum Jump:


Users browsing this thread: 1 Guest(s)