[Gambas-user] Ordering a bi-dimensional string[]...by several columns help wanted.
Gianluigi
bagonergi at gmail.com
Sat Dec 1 20:02:11 CET 2018
Il giorno sab 1 dic 2018 alle ore 19:14 Jorge Carrión <shordi at gmail.com> ha
scritto:
> The problem:
>
> I need order a bi-dimensional array by several columns following de user's
> criteria.
>
> It is relatively simple to order a two-dimensional array for a column, not
> long ago we saw several solutions in this mail list, but what I need now is
> to sort by several columns and that each of them can be ascending or
> descending.
>
> I confess that I have been stuck with the subject for four days, that I
> have believed more than once that I had solved it and that in the end I
> have given up doing it alone. Does anyone have any idea how to approach the
> issue before it drives me crazy?
>
> There is a "tricky" solution: grab your two-dimensional array, create with
> it a sqlite base and let the sqlite engine solve the issue with an SQL
> statement ... but this is not the case (it would force the project to link
> with the modules database and it's not always convenient)
>
> Waiting for the better minds than mine advice...
>
> Best Regards
>
>
Very interesting problem, unfortunately more than my capacity.
A suggestion, have you already tried using the special _Compare [0] method?
Regards
Gianluigi
[0] http://gambaswiki.org/wiki/lang/special/compare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181201/1da5d56e/attachment.html>
More information about the User
mailing list