Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASCAN on a two dimensional array
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00443772
Message ID:
00443827
Vues:
11
>Have an array1[9,3]. Want to search the second dimension [1,2] to [9,2] for a value. How do I limit the ASCAN to the second dimensnion only?
>Thanks
>Brenda
You only need to resort to complex measures if a data type in one of the other columns of the array is the same as the data type of the expression that you are searching for!

If each is distinct then you can use ASCAN() with impunity and let it scan the entire array. Even if the columns contain values with the same data type, you only need to be concerned if you know for certain that values in one column can also appear in one of the other columns.

To determine which column a match was found in, you can use:
iElement = ASCAN( aMyArray, xSearchForThis )
iColumn = ASUBSCRIPT( aMyArray, iElement, 2 )
censored.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform