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

Sorting 2 dimensional arrays (ASort)

Status
Not open for further replies.

Tfrymire

Programmer
Joined
Oct 16, 2001
Messages
3
Location
US
I'm having problems sorting two dimensional arrays. I've done it before but can't find the code. Any help appreciated.
 
Oh, This is a Visual Foxpro 6 Question
 
To clarify, you want to sort the rows on a specific column?

These examples from the Hacker's Guide should clarify the procedure:
Code:
= ADIR(aFiles, "*.DBF")   && Get a list of DBFs
= ASORT(aFiles)           && Put in name order
= ASORT(aFiles, 1, -1, 1) && Put in descending name order
= ASORT(aFiles, 2)        && Put in size order
= ASORT(aFiles, 3, 3)     && Put the first 3 rows in date order
= ASORT(aFiles, 18, 5)    && Put the 4th through 8th rows 
                          && in date order
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top