BBS: Inland Empire Archive Date: 02-06-93 (21:00) Number: 321 From: DAVID WANG Refer#: NONE To: WAYNE VENABLES Recvd: NO Subj: Re: Sorting Conf: (2) Quik_Bas
On 02-02-93 20:44 Wayne Venables declared "Sorting" to All...
WV> I badly need a good pointer sort routine for a program im writing,
WV> and I don't know every much about sorting... The routine needs to be
Have you looked at QB's QuickSort Routine? Victor has a MUCH speedier
version of it, and maybe he'll show you his secret (I don't remeber what it
was...)
I'm not a good sort writer, too, but I only know one very simple sort, the
bubble. It is not that fast (I would call it average_, but it only takes
about 4 to 6 unconnected lines, and is easy to remember. Now, if anyone
here can teach me the binary sort and the shell sort...
Simple Shell Sort:
6 elements to sort
For X = 1 to 5
IF Num(X) > Num(A+1) THEN SWAP Num(X), Num(X+1)
NEXT
I know, I know, this is far from being optimized, so please don't jump down
my throat. But it is short and easy to memorize (I have a knack at
memorizing...)
... Windows isn't a virus; a virus does something.
--- Blue Wave/RA v2.10 [NR]
* Origin: Hard Disc Cafe / Houston Texas / (713) 589-2690 / (1:106/30.0)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET