-
Nov 25th, 2010, 07:26 PM
#1
Thread Starter
Lively Member
[RESOLVED] Sort multidimensional array
peace
The array is 4 dimensions Ar(A,B,C,D)=X
all values(A,B,C,D and X) are integers >= 0 (decimal not allowed )
I need to sort that array (descending) by the value of X
then reorder A
an example
before sorting
Ar(0,5,1,0)=3
Ar(1,6,1,10)=7
Ar(2,7,1,5)=1
Ar(3,8,1,5)=10
After sorting
Ar(0,8,1,5)=10
Ar(1,6,1,10)=7
Ar(2,5,1,0)=3
Ar(3,7,1,5)=1
that's all
thanks for help
Last edited by Khalefa...@; Nov 27th, 2010 at 07:58 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|