Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INLIST not working ?
Message
From
19/06/2002 01:59:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
INLIST not working ?
Miscellaneous
Thread ID:
00670017
Message ID:
00670017
Views:
54
Hi, I am using INLIST() function to check whether any of my key is
in my lKeyList, but it is not working for me, below is part of my
code that I cut out for testing and is not working too.

Inside admin.dbf, there are record of 100,128,100 and 102
Please kindly comment why I not getting inlist() to work ?


SET DELETED ON
gDstDir = "d:\winprog\pdatask\data\"

lKeyList = ""
USE (gDstDir+"admin.dbf") IN 0 ALIAS adm
SELECT adm
GO TOP
DO WHILE NOT EOF("adm")

lKey = ''
lKey = ALLT(STR(adm->keybrd))

IF NOT EMPTY(lKey)

Messagebox("Checking keylist = "+lkeylist+", with current key = "+lkey)
IF NOT INLIST(lKeyList, lkey)

Messagebox("Not in list")

IF EMPTY(lKeyList)

Messagebox("Key list empty")

lKeyList = lkey

Messagebox("New key list is now : "+lkeylist)

ELSE

Messagebox("Before append Keylist = "+lkeylist)

lKeyList = ALLT(lKeyList + "," + lKey)

Messagebox("After append, New Keylist = "+lkeylist)

ENDIF
ENDIF

ENDIF

SKIP +1 IN adm

ENDDO
USE IN adm

messagebox("The final keylist = "+lkeylist)

CLOSE DATA ALL
Best Regards
Virusim
Next
Reply
Map
View

Click here to load this message in the networking platform