Results 1 to 13 of 13

Thread: [RESOLVED] Sort multidimensional array

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2006
    Posts
    91

    Resolved [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
  •  



Click Here to Expand Forum to Full Width