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:32:06
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
16/02/2007 11:04:46
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01196479
Message ID:
01196604
Vues:
11
>>>>>>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.
>
>Well that sounds like a candidate for a standard! We're all in agreement. :)

Except that Exact Off is the default, and I guess 99% of Fox programmers never changed it across the board. So, your candidate doesn't have much chance in the real world out there, he already lost.

I've worked on one case where it WAS the standard, and it bit me a few times. I would, for instance, try to compare two strings where the left one was longer, and it kept returning .f. simply because they weren't strictly equal. I actually had to know the length of the right string, and apply "if left(leftstring, len(rightstring))=rightstring" to get what I would get with "if leftstring=rightstring" using Exact Off.

It was the same puzzle I had to deal with, in the other direction, when I switched from Cobol (and other languages) to Fox.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform