Elgin,
Small but important correction: It should be
("DEHYDRATE" $ lcStr)
("*DEHYDRATE*" $ lcStr)
I would suspend code on the line that doesn't work, copy and run peaces of code from command window to find "offending code".
>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) ;)
--sb--