Jump to content
Sign in to follow this  
twbradio

Two dimensional array sorting

Recommended Posts

Does anyone have an example of two dimensional array sorting using _ArraySort that I could look at :idiot: . I am not sure that I understand all of the parameters, their defaults, and if there is a value to be used to ignore a parameter. Since I am working in the GUI beta I am posting this here ... :D my appologies if this seems a bit off topic.

Edited by twbradio

Anyone have a TRS 80 Model III for sale?

Share this post


Link to post
Share on other sites

Func _ArraySort(ByRef $a_Array, $i_Decending = 0, $i_Base = 0, $i_Ubound = 0, $i_Dim = 1, $i_SortIndex = 0)

You can simply call _ArraySort($myArray, 0, 0, 0, 2) and have your array sorted in ascending order according to the first 'column' of your 2D array (see it as a matrix).

Or call _ArraySort($myArray, 1, 0, 0 ,2) to have it sorted in descending order.

Or call _ArraySort($myArray, 0, 0, 0, 2, 3) to have it sorted in ascending order according to the 3rd 'column' of your 2D array.

Does it help?

If you need more arrays related tools or informations, let's have a look here...

Edited by LazyCoder

A good program computing A into B is mostly one that won't crash in all the other cases...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...