[Harbour] Sorting the array

2009-12-03 Thread vatzct
See sample: func main() local atst:={{6.06,1,1},{9.92,1,2},{9.90,1,3},{9.34,1,4},{11.38,1,5}} local yy cls ?before sorting for yy :=1 to len(atst) ?yy,atst[yy,1],atst[yy,2],atst[yy,3] next asort(atst,{|x,y|x[2]y[2]}) ?after sorting for yy :=1 to len(atst) ?yy,atst[yy,1],atst[yy,2],atst[yy,3] next

Re: [Harbour] Sorting the array

2009-12-03 Thread Mindaugas Kavaliauskas
Hi, asort(atst,{|x,y|x[2]y[2]}) what rule asort use in this case? Just like always, it uses the 4th parameter of ASORT(). Regards, Mindaugas ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org

Re: [Harbour] Sorting the array

2009-12-03 Thread vatzct
Mindaugas Kavaliauskas написав(ла): Hi, asort(atst,{|x,y|x[2]y[2]}) what rule asort use in this case? Just like always, it uses the 4th parameter of ASORT(). Regards, Mindaugas ___ Harbour mailing list (attachment size limit: 40KB)

Re: [Harbour] Sorting the array

2009-12-03 Thread Viktor Szakáts
Yes of cause you are right, i'm not carefully read doc, but result is same with asort(atst,,,{|x,y|x[2]y[2]}) before sorting 1 6.06 1 1 2 9.92 1 2 3 9.90 1 3 4 9.34