[Gambas-user] Array.SortUsing() metod

Benoît Minisini g4mba5 at gmail.com
Fri Mar 8 18:02:31 CET 2019


Le 08/03/2019 à 17:49, Gianluigi a écrit :
> 
> 
> Il giorno ven 8 mar 2019 alle ore 17:45 Gianluigi <bagonergi at gmail.com 
> <mailto:bagonergi at gmail.com>> ha scritto:
> 
>     I know that today is not a good day for me, but a kind person could
>     show me how the new Array.SortUsing() [0] method works.
> 
>     TIA & Regards
>     Gianluigi
> 
> 
> In fact, I forgot the link :-(
> [0] 
> https://gitlab.com/gambas/gambas/commit/d668dadcf5eb887ae9bca2b5ed56c311319a51e1
> 
> Regards
> Gianluigi
> 
> 
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> 

I didn't have the time to make the wiki page yet.

A.SortUsing(B) sorts the A array using the order defined by the B array.

For example :

A = ["A", "B", "C", "D", "E"]
B = [4, 1, 2, 10, 8]

A.SortUsing(B)

Now A is ["B", "C", "A", "E", "D"]

-- 
Benoît Minisini


More information about the User mailing list