Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on ADIR() and ASORT()
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01362370
Message ID:
01362406
Views:
13
>>You sorted it on the fifth column, which is a file attributes. To sort on the first column ( a file name), ommit the second parameter all together
>>
>>ASORT(aInputFiles)
>>
>>
>
>Thank you for your help. But (just so that I can learn) if I used parameter 1, would ASORT(aInputFile,1), still sort on the first column? I am just trying to justify to myself that maybe using parameter 5 was just a type and not early sign of losing my mind *g*.

Sorry, was busy with something else, was unable to help. In the Help file it is explicit

nStartElement
Specifies the starting element of the sort. If you omit nStartElement, the array is sorted starting with the first array element by default. If the array is one-dimensional, the sort includes nStartElement. If the array is two-dimensional, the starting element nStartElement determines both the row where the sort begins and the column that determines the sort order of the rows.

Note
You can refer to an element in a two-dimensional array in one of two ways. The first method uses two subscripts to specify the row and column position of the element in the array; the other method uses an element number. This function and others that manipulate two-dimensional arrays require element numbers (in ASORT() the numeric expressions nStartElement and nNumberSorted). You can use AELEMENT( ) to return the element number from row and column subscripts in a two-dimensional array.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform