Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Asort
Message
From
03/12/1998 20:13:29
 
 
To
03/12/1998 20:01:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Asort
Miscellaneous
Thread ID:
00163910
Message ID:
00163913
Views:
25
>I type - USE Mytable - SET ORDER TO Myfield - COPY TO ARRAY Myarray FIELD Myfield - Myarray is now a list of numbers from a numeric field in ascending order. At this point I cannot seem to get the syntax correct for the next command, which is an ASORT( ) that will reverse the sort order to descending. How do I refer to the first element without adding an extra comma to the ASORT( )?

Easiest woulde be to redo your method of building the list. Instead of:

USE MyTable
SET ORDER TO MyField
COPY TO ARRAY MyArray FIELD MyField

Why not:
SELECT MyField ;
  FROM MyTable ;
    TO ARRAY MyArray ;
 ORDER BY MyField DESC
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform