Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search of several units in the array.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00155468
Message ID:
00155471
Vues:
18
There's an ASCAN() function, but it's probably not powerful enough for your needs. Try something like this:
m.lnRowFound=0
FOR i=1 TO ALEN(aCache,1)
  IF aCache[i,1]=Search1 AND aCache[i,2]=Search2 AND ...
    m.lnRowFound=i
    EXIT
  ENDIF
NEXT
This will scan the array looking for the appropriate values. After the loop, lnRowFound will contain 0 if the values weren't found or the row containing the values if they were found.

>Hi.
>There is an array aCache [x, 4]
>It is necessary to me to find the fourth array cell on 3 known values.
>If it would be in the table I has written
>LOCATE FOR x1=Search1 AND x2=Search2 AND x3=Search3
>IF FOUND ()
> lnResult = x4
>ENDIF
>But as it to make with array cells?
>Thanks.
>Denis.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform