[Gambas-user] Sort multidimensional array?

Matti matti.eber at ...3240...
Mon Feb 6 23:26:59 CET 2017


Hi Riccardo,

this is a question I had long years ago. At this time it was not possible.
As I remember, I used a dirty workaround, reducing the two-dimensionsional array by inserting a "/" to a one-dimensional array, sorting it and removing the "/" later.

Depends on what array you have to sort.

Example for the workaround is attatched. Look at the FMain 'mnuSortA' and 'mnuSortT' Subs.

Hope this helps, but I'm really not up to date.

Matti

Am 06.02.2017 um 22:23 schrieb Riccardo:
> Hi,
>
> Is it possible to use the array.sort() method on a two-dimensional array?
>
>
>
>   
>
>>          Public arr_Response As New String[][]
>>
>
>
>
> Specifically, I'd like to sort the entire array based on the contents of the second column something like: arr_Response[][1].sort() ...
>
>
>
>
>   cheers.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Lighttable-0.2.23.tar.gz
Type: application/x-gzip
Size: 47200 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20170206/832bf2d3/attachment.bin>


More information about the User mailing list