Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF..ELSE...ENDIF Statements
Message
From
01/03/2003 21:20:58
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00757414
Message ID:
00760061
Views:
17
Hi Elgin

PMFJI, but just to make me feel better, are you certain you don't have a field named lcstr in one of the open aliases, and you are never selecting that alias while the code runs?

>Sergey,
>
>>Is it possible that lcStr is padded with spaces on the right (lcStr = "RT/DEHYDRATE ")? In this case ? LIKE("RT/DEHYDRATE", lcStr) OR LIKE("DEHYDRATE", lcStr) will return .F.

>
>I forgot to metion that section of code starts with:
>
>  IF !EMPTY(tmpLiquid.rec_servic)
>	lcStr = UPPER(ALLTRIM(tmpLiquid.rec_servic))
>    DO CASE...
>
>       CASE code
>    ENDCASE...
>
>  ENDIF
>
>
>
>>First, I wasn't sure if you where aware about that. Second, when I saw LIKE() w/o wildcard characters I started wondering if you forgot to add them. It all comes down to readability. If you don't need wildcards why use LIKE() function?
>>Tell you truth I almost never use this function. Instead of LIKE("*DEHYDRATE*", lcStr) I would use ("*DEHYDRATE*" $ lcStr). It's just my personal preference but again I think it makes code more readable. :)

>
>I will keep these suggestions in mind. I may yet go back and take out the LIKE() function. I didn't really "like" it too much either. (no pun intended) ;)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform