Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search an Array for duplicates
Message
From
22/05/2003 09:27:22
 
 
To
22/05/2003 09:13:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00791559
Message ID:
00791569
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform