bool ArraySort(object array[ ], int count=WHOLE_ARRAY, int start=0, int sort_dir=MODE_ASCEND)
Sorts numeric arrays by first dimension. Series arrays cannot be sorted
by ArraySort().
数値配列の最初の次元を並び替えます。直列配列は ArraySort() では並び替えすることはできません。
Parameters:
パラメータ:
array[] - The numeric array to be sorted.
並び替えられる数値配列。
count - Count of elements to be sorted.
並び替えられる要素の数。
start - Starting index.
開始インデックス。
sort_dir - Array sorting direction. It can be any of the following values:
配列の並び替え方向。値は次のいずれかを指定できます。
・MODE_ASCEND : sort ascending.
昇順で並び替え。
・MODE_DESCEND : sort descending.
降順で並び替え。
Sample:
サンプル:
double num_array[5]={4,1,6,3,9};
// now array contains values 4,1,6,3,9
ArraySort(num_array);
// now array is sorted 1,3,4,6,9
ArraySort(num_array,WHOLE_ARRAY,0,MODE_DESCEND);
// now array is sorted 9,6,4,3,1
|