Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking up values in an array
Message
De
29/08/2001 00:36:40
 
 
À
28/08/2001 17:41:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00550067
Message ID:
00550149
Vues:
20
>There's no other function to search for a value in an array, you're probably going to have to order the array and then compare all the values one by one.
>
>Either ASORT() or adding ORDER BY to your select would give you an ordered array that you can work with for this.

If you "compare all the values one by one," there is no benefit from ordering the array. If you do a binary search of the array, the ordering is required and the search will be extremely efficient and will outperform an ascan() after arrays reach about 3000 rows.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform