Sort function for 2-dimensional array?
I have the follwing:
A two-dimensional array.
Dim array(256,2)
where array(256,0) and array(256,1) represent two different data sets.
I want to find max and min values and the indices of each data set. Of course, I know the brutal force method testing individually each array component for a fixed second index (array(i,0) and array(i,1)). But for a 1-dimensional array the sort function seems to be more elegant as pointed out in previous posts (if it's faster I still have to find out). The question is how to pass each of the data sets (array(1...256,0) and array(1...256,0) separately to the sort function, conventiently...
In a different computer language I am used to pass just parts of arrays. For example I would use max(array[*,0]) to get the maximum of the first data set. The star refers to the whole first dimension (also, e.g., array[4:66,0] would be possible). Is there a similar way in B4A? Or do I have to first copy each data set (aray(0...255,0) and array(0...255,1)) to a 1-dimensional array before using the sort function?
Thanks, positrom2