Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question on a Quick Sort routine
#5
(09-24-2023, 02:27 PM)Dimster Wrote: Thanks b+ - motivation is simply error messages and failed code or misunderstanding of the proper syntax. In this Sort case, its an error message that I did get years ago and forgot exactly how I solved it. In my program I have multiple sorts and this one particular sort kept erroring out with the message that it did not require the arguments when I knew if did. I was having a hard time trying to understand why all the others worked perfectly and yet this one was a no go. Immediately after posting for some ideas as what I was missing the problem and solution became obvious. In fact, it was so obvious that I didn't think it was the problem - unable to see the forest for the trees again.

Anyway, I use the Start, Finish variables to control the number of sorts and then the sort call becomes SortArray (begin, finish, Array2Sort()). The error happened because I inadvertently called the SortArray(Start, Finish, Array2Sort()).

I don't even recall typing it that way and to make matters worst, I spent about 1 hour looking at this and could see what the problem was.

Yeah either CALL it or remove extra ( )'s I have same problem going from QB64 to JB. In JB you don't use () even when you define the SUB. The error message for that in JB is useless!
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
Question on a Quick Sort routine - by Dimster - 09-23-2023, 04:28 PM
RE: Question on a Quick Sort routine - by Dimster - 09-23-2023, 06:08 PM
RE: Question on a Quick Sort routine - by bplus - 09-23-2023, 06:29 PM
RE: Question on a Quick Sort routine - by Dimster - 09-24-2023, 02:27 PM
RE: Question on a Quick Sort routine - by bplus - 09-25-2023, 12:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to sort negative and positive values ? Jack 16 666 02-23-2026, 02:18 AM
Last Post: Pete
  _Putimage Question. Pete 11 704 01-04-2026, 09:33 PM
Last Post: Pete
  Nice simple, I hope, question Mad Axeman 4 360 12-20-2025, 09:28 PM
Last Post: SMcNeill
  NewBie Question niteflyer 2 345 11-06-2025, 07:11 PM
Last Post: Petr
  A Question About _MAPTRIANGLE Magdha 2 388 11-02-2025, 11:37 AM
Last Post: Magdha

Forum Jump:


Users browsing this thread: 1 Guest(s)