Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getwordnum working wrong
Message
From
08/02/2006 09:48:23
 
 
To
08/02/2006 09:13:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01094614
Message ID:
01094633
Views:
14
This message has been marked as the solution to the initial question of the thread.
This is the CORRECT way to do it:
lc_sele = "HP%DRUCKER AND (PRICE>100,00) AND (PRICE<200,00)"
lcTest=Strtran(lc_sele,' AND ',chr(249)) && or some other CHR() value which is never used!
?GETWORDCOUNT(lcTest,chr(249))
>Hello,
>Here is little example
>
>lc_sele = "HP%DRUCKER AND (PRICE>100,00) AND (PRICE<200,00)"
>?GETWORDCOUNT(lc_sele," AND ")    && return 4
>?GETWORDNUM(lc_sele,1," AND ")     && return HP%
>?GETWORDNUM(lc_sele,2," AND ")     && return RUCKER
>?GETWORDNUM(lc_sele,3," AND ")     && return (PRICE>100,00)
>?GETWORDNUM(lc_sele,4," AND ")     && return (PRICE<200,00)
>
>
>Why? 1-2?
>
>Denis
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform