Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting an array from lowest to highest.

Status
Not open for further replies.

hoots711

Structural
Jan 5, 2006
19
I have a array of 4 angles that I need to sort from lowest to highest

example
angl(4)

angl.1 = 1.305
angl.2 = 1.272
angl.3 = 1.342
angl.4 = 1.31

I need to set the array to variables for lowest to highest.

example
1st = angl.2
2nd = angl.1
3rd = angl.4
4th = angl.3

I have been messing aroudn with for loops and things but I cant seem to get it to work.

Is there a sorting method I can use?

Thanks!
 
Replies continue below

Recommended for you

I don't understand why you can't use the sort function

TTFN



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor