Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What to use, SET EXACT ON or ==?
Message
De
16/02/2007 11:56:06
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01196479
Message ID:
01196615
Vues:
8
>>>>>>I guess, being a lazy person <g>, I was looking for a all-inclusive "<>" "exact" operator. That way I would not have to worry about SET EXACT OFF or ON and simply use "==" when comparing for equal and "<==> ((c) Copyright Dmitry Litvak <g>) for not equal.
>>>>>
>>>>>Your all-inclusive operation is "NOT a == b"
>>>>
>>>>But Sergey said not to use it <g>.
>>>
>>>I didn't say that. I said that it's preferable than flipping SET EXACT around which could cause hard to trace bugs in other parts of application..
>>
>>Keeping SET EXACT ON makes clean distinction for Seek(), so I prefer it this way.
>
>Just to voice the opposing point of view, using SET EXACT OFF as the default environmental setting allows for SEEK and = comparisons to find partial matches as in SEEK "Jo" finding John, Joan, Jones, etc. SET EXACT ON disallows that partial matching. When exact match is required it is very easy to use == for the comparison or to pad the SEEK string to be equal in length to the index expression.

That's exactly why I set it ON. I'm scared with a possibility that Seek will give wrong (i.e. not exact) match, and I don't like padding every time I use Seek.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform