Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best Bubble Sort
#6
(10-24-2023, 06:00 PM)NakedApe Wrote: ...

That's cool and so few lines of code. I don't get your loop starting WHILE 1 ... WEND though. How does that work? While what's 1? Scratches head . . .

While looks for Boolean expression that evaluates to 0 or not 0 eg 1

So While 1 sets up an infinite loop that needs an escape clause inside it or depends on top right X box to close program. Better would have been:
While _KeyDown(27) = 0

bubble was from some really old code, 6 years I think, ya live, ya learn if you do well.
b = b + ...
Reply


Messages In This Thread
Best Bubble Sort - by dbox - 10-20-2023, 07:36 PM
RE: Best Bubble Sort - by bplus - 10-20-2023, 07:43 PM
RE: Best Bubble Sort - by mnrvovrfc - 10-20-2023, 09:21 PM
RE: Best Bubble Sort - by bplus - 10-20-2023, 11:24 PM
RE: Best Bubble Sort - by NakedApe - 10-24-2023, 06:00 PM
RE: Best Bubble Sort - by bplus - 10-24-2023, 07:06 PM
RE: Best Bubble Sort - by mnrvovrfc - 10-24-2023, 07:42 PM
RE: Best Bubble Sort - by bplus - 10-24-2023, 07:59 PM
RE: Best Bubble Sort - by NakedApe - 10-31-2023, 07:30 PM



Users browsing this thread: 1 Guest(s)