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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sorting an array

Status
Not open for further replies.

jackie1948

Programmer
Jan 25, 2002
78
US
how do i get my array to sort and display in the listbox by the year field in desending order?
 
how do i get my array to sort and display in the listbox by the year field in desending order?

Code:
DIMENSION gaArray(3,2)
gaArray(1) = 'G'
gaArray(2) = 'A'
gaArray(3) = 'C'
gaArray(4) = 'Z'
gaArray(5) = 'B'
gaArray(6) = 'N'
ASORT(gaArray,1)

Will sort element by the first element. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
HI

ASORT(gaArray,1,-1,1)

should do the trick for you.

_1 indicates all elements
the last 1 indicates descending.

:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top