Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Jan 5, 2006
Messages
19
Location
US
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!
 
I don't understand why you can't use the sort function

TTFN



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top