I want a sort routine that runs quick and is efficient. I don't mind if its a bubble sort, or quick sort. Just something that is quick.
What i have is a type structure array:
Ok, now thats a little clearer. I have that array, that is variably sized. I now want a sort routine, to sort on the percentage made by:Code:Type stuff aString as String * 12 aMaxVal as long aMinVal as long end type public stuffArray() as stuff Private Sub Form_Load() variableNumber = Int((rnd * 20)+1) redim stuffArray(1 to variableNumber) end sub
and then place the sorted array into another array to be passed back from the sub, ieCode:percentage = int((aMinVal / aMaxVal) * 100)
That way i can pass the array in, and get the ubound and lbound of it and send one of the same size back.Code:Private Sub sortArray(incomingArray() as stuff, sortedArray() as stuff)
Any ideas? It seems fairly simple and i have a sort routine at the moment, but it seems to bulky. I know it can be done better.
Cheers
BW
[Edited by But_Why on 09-21-2000 at 04:28 PM]





Reply With Quote