I need to set up a multi-element sort.
I have an array that contains <= 50 "rows". Each row will have 20 "columns".
Defined as MyArray(50,20)
Sample data could look like:
Name4, Category2, 4, 5, 7, ...
Name3, Category1, 7, 4, 9, ...
Name2, Category2, 8, 3, 4, ...
Name1, Category3, 5, 2, 1, ...
etc.
I want to sort the array first by Category, then by name. Final result should be:
Name3, Category1, 4, 5, 7, ...
Name2, Category2, 7, 4, 9, ...
Name4, Category2, 8, 3, 4, ...
Name1, Category3, 5, 2, 1, ...
Your suggestions for the best sorting technique to use ? If you have such an example, it would be appreciated. Thank You.
Bob Hall
I have an array that contains <= 50 "rows". Each row will have 20 "columns".
Defined as MyArray(50,20)
Sample data could look like:
Name4, Category2, 4, 5, 7, ...
Name3, Category1, 7, 4, 9, ...
Name2, Category2, 8, 3, 4, ...
Name1, Category3, 5, 2, 1, ...
etc.
I want to sort the array first by Category, then by name. Final result should be:
Name3, Category1, 4, 5, 7, ...
Name2, Category2, 7, 4, 9, ...
Name4, Category2, 8, 3, 4, ...
Name1, Category3, 5, 2, 1, ...
Your suggestions for the best sorting technique to use ? If you have such an example, it would be appreciated. Thank You.
Bob Hall