Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search an Array for duplicates
Message
De
22/05/2003 09:27:22
 
 
À
22/05/2003 09:13:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00791559
Message ID:
00791569
Vues:
10
Hi Amanda,
firstFound=ascan(laDBFInfo,'bob',1,lnFieldNumber,1,1)
DO CASE
    CASE m.firstFound=0
       * NOT FOUND
    CASE ascan(laDBFInfo,'bob',m.firstFound+1,lnFieldNumber,1,1)=0
       * UNIQUE
    OTHERWISE
       * DOUBLE
ENDCASE

for count:

STORE 0 TO lastFound
FOR cntFound=0 TO ALEN(laDBFInfo,1)
  lastFound = ascan(laDBFInfo,'bob',m.lastFound+1,lnFieldNumber,1,1)
  IF m.lastFound=0
     EXIT
   ENDIF
ENDFOR
? cntFound
Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform