Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Skipping within a For Loop
#9
Well, this is a CASE where _CONTINUE isn't even needed. Also, if you want to make the cases simplified, try...

Code: (Select All)
PRINT
PRINT
FOR x = 1 TO 10
    SELECT CASE x
        CASE 1, 3, 4, 6, 7, 9, 10
            PRINT x;
    END SELECT
NEXT

Now all examples will do the same thing, but if you start to get into 100's or 1000's of lines of code, keep in mind smaller routines make for easier understanding and debugging.

Pete
Reply


Messages In This Thread
Skipping within a For Loop - by Dimster - 10-23-2022, 03:38 PM
RE: Skipping within a For Loop - by Pete - 10-23-2022, 03:46 PM
RE: Skipping within a For Loop - by SMcNeill - 10-23-2022, 03:49 PM
RE: Skipping within a For Loop - by SMcNeill - 10-23-2022, 03:52 PM
RE: Skipping within a For Loop - by PhilOfPerth - 10-23-2022, 11:03 PM
RE: Skipping within a For Loop - by a740g - 10-23-2022, 03:54 PM
RE: Skipping within a For Loop - by SMcNeill - 10-23-2022, 03:56 PM
RE: Skipping within a For Loop - by Pete - 10-23-2022, 04:15 PM
RE: Skipping within a For Loop - by Dimster - 10-23-2022, 04:48 PM
RE: Skipping within a For Loop - by Pete - 10-23-2022, 04:58 PM
RE: Skipping within a For Loop - by OldMoses - 10-23-2022, 06:08 PM
RE: Skipping within a For Loop - by Pete - 10-23-2022, 08:30 PM
RE: Skipping within a For Loop - by Dimster - 10-23-2022, 10:02 PM
RE: Skipping within a For Loop - by Pete - 10-23-2022, 11:36 PM
RE: Skipping within a For Loop - by OldMoses - 10-23-2022, 11:48 PM
RE: Skipping within a For Loop - by Pete - 10-24-2022, 12:11 AM
RE: Skipping within a For Loop - by mnrvovrfc - 10-24-2022, 11:18 AM
RE: Skipping within a For Loop - by Dimster - 10-24-2022, 03:52 PM
RE: Skipping within a For Loop - by mnrvovrfc - 10-24-2022, 07:16 PM
RE: Skipping within a For Loop - by Pete - 10-24-2022, 04:46 PM
RE: Skipping within a For Loop - by Dimster - 10-24-2022, 06:03 PM
RE: Skipping within a For Loop - by CharlieJV - 10-24-2022, 06:19 PM
RE: Skipping within a For Loop - by Pete - 10-24-2022, 06:27 PM
RE: Skipping within a For Loop - by mnrvovrfc - 10-24-2022, 07:11 PM
RE: Skipping within a For Loop - by Pete - 10-24-2022, 08:44 PM



Users browsing this thread: 29 Guest(s)