1 vardata = JUSTEP.XBL ("Detaildata");2 //define two arrays3 varList1 =NewArray (Data.getcount ());4 varList2 =NewArray (Data.getcount ());5 //assign a value to two arrays6 for(i = 0; i < Data.getcount (); i++) {7List1[i] =Data.getid (i);8List2[i] = Data.getvalue ("Fbidprice", Data.getid (i));9 Ten } One //Sort: Compare the size of the amount, the big move down, after the end of the order, the amount of the largest move to the bottom; A //Second comparison, the second largest amount moved to the penultimate, until all the comparison, is an ascending order of the amount; - for(varj = list2.length-1; J > 0; j--) { - for(vari = 0; I < J; i++) { the if(List2[i] * 1 > list2[i + 1] * 1) { - varx =List2[i]; -List2[i] = list2[i + 1]; -List2[i + 1] =x; + - vary =List1[i]; +List1[i] = list1[i + 1]; AList1[i + 1] =y; at } - } - } - //Show Rank - for(i = 0; i < list1.length; i++) { -Data.setvalue ("franking", I + 1, List1[i]); in}
Sort Ascending by Amount size