Hi John ---
Yes, I know about the tag switch in SEEK, but I thought it might make the code less obvious; better to show the ORDER clause in the use so it'd be readily apparent....sort of a difference between tutorial code and production code. If this was production code it might be:
USE userlist
RETU SEEK(SUBS(SYS(0),AT("#",SYS(0)),2,15),"userlist","username")
>
>On a slightly different subject, although I'm sure you already know this (someone might find it useful anyway), the SEEK() takes a third parameter, the index file/tag. Thus, you could do: IF SEEK(cName,"userlist","username") w/o setting the index/tag prehand and switch at will.
>
>The reason I'm mentioning it here is that although I've been using the SEEK() for a long, long time, I overlooked it until few month's ago. I think it made for more compact, readable code.
>
>>Here 'tis ----
>>
>>USE userlist ORDER username
>>cName=SUBSTR(SYS(0),AT("#",SYS(0))+2,15)
>>
>>IF SEEK(cName,"userlist")
>> RETURN .T.
>>ELSE
>> RETURN .F.
>>ENDIF
>>
>>
>>> Thanks for you suggestion, but I 'm not 100% understand. So, I would like to suggest me some sample codes which use sys(0).
>>> Thanks again for your time.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05