Mike Yearwood
Toronto, Ontario, Canada
Versions des environnements
>>>>>>>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.
I'm sorry Dragan. I was excited that finally, for once, some kind of consensus might possibly have been reached by a group of people who use "logic". I thought he meant to KEEP set exact at its default. SET EXACT OFF is my expectation. Exact matches should be handled manually as they will then work properly regardless of the SET EXACT setting.
Flipping SET EXACT from the default should be the exception.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement