So yeah... i'm trying to make a script that gives me medians... but I can't sort a list of numbers because it will put multiple-digit numbers in the wrong place.
For example, I put in 1,2,3,10,22,31 in _ArraySort and it gives me
1,10,2,22,3,31
Any way I can put these numbers in order of least to greatest?
Like This...
#include <array.au3>
$Array = StringSplit("2,5,3,4,6,1,8,9,7", ",")
_ArraySortNum($Array)
_ArrayDisplay($Array, "Sorted Array")
Func _ArraySortNum(ByRef $n_array, $i_descending = 0, $i_start = 1)
Local $i_ub = UBound($n_array)
For $i_count = $i_start To $i_ub - 2
Local $i_se = $i_count
If $i_descending Then
For $x_count = $i_count To $i_ub - 1
If Number($n_array[$i_se]) < Number($n_array[$x_count]) Then $i_se = $x_count
Next
Else
For $x_count =