Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IF..ELSE...ENDIF Statements
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00757414
Message ID:
00760056
Vues:
16
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) ;)
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform