Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Asort by specific column in a multi-dimensional array
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00539014
Message ID:
00539022
Views:
11
>>Hi everyone,
>>
>>I have lnFields=afields(laFields). I want to have all fields sorted alphabetically. How can I do it in VFP6.0? Is this function improved in VFP7.0?
>>
>>Thanks in advance.
>
>ASORT() is basically the same in 7. However, in 7, you can ASCAN() a specific column an make the search case-insensitive. I'm afraid you will have to roll your own to sort by other columns in either version.

I'm just wondering, may be somebody have this function written already, so I don't need to reinvent the wheel. I thought for a few minutes about this problem and haven't came up to the algorithm yet...

BTW, I think, all "ARRAYS" functions should have an ability to work with the particular column, e.g. has an additional argument. Perhaps, it could be a wish for VFP8.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform