VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Two Dimensional Array Sorting

Matthew J. Cavallari  (1 Submission)   VB function enhancement   Visual Basic 3.0   Beginner   Wed 3rd February 2021

A class library with one public array sorting function and four supporting private functions. The primary work done by the library is done by the recursively called function MultiSortRecur, which sorts any two dimensional array, given the array to be sorted and the order over which the array's second dimension will be sorted. It uses a divide and conquer type algorithm (similar to a QuickSort).
An example of usage would be where a two dimensional array is seen as a type of recordset where the first dimension describes the rows and the second dimension describes the fields collection. The recordset (array) can then be multisorted according to column order in ascending or descending order. (i.e. have the the array sorted by 4th column as ascending and upon those which items match, then 2nd column as descending, etc.

Inputs
The public function MultiSort takes two parameters: 1: a two dimensional array to be sorted 2: a sort order array of optional length (ParamArray) which describes the column sort order and order type

Returns
no returns

Side Effects
none that are known of

Rate Two Dimensional Array Sorting (3(3 Vote))

Download Two Dimensional Array Sorting

Two Dimensional Array Sorting Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters