Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple sorting on 2-dimensional arrays
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00188684
Message ID:
00188853
Vues:
24
>Thanks, Ed!
>
>(I think I also just learned a new word -QUAD! Cool!)
>

QUAD = QUick And Dirty

>Mark
>
>>The QUAD way I do this is to construct a cursor with the right number of columns, append the data from the array, and then do a SQL SELECT back to the original array ordered as desired.
>>
>>Assuming both columns were character fields:
>>
>>
CREATE CURSOR SortArray (Col1 C(254), Col2 C(254)
>>APPEND from ARRAY aMyArray
>>RELEASE aMyArray
>>SELECT ALLTRIM(Col1), ALLTRIM(Col2) FROM SortArray INTO ARRAY aMyArray ORDER BY Col1, Col2
>>USE
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform