Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Commonly misused and abused VFP features
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00310951
Message ID:
00311952
Vues:
39
>Hi Jim,
>
>>You are absolutely correct. Somewhere here recently I posted an example of where they are not the same.
>
>The main difference is that == compares ANSI codes, while = compares characters. Both are the same, if SET COLLATE is "MACHINE" and no codepage conversion jumps in. But otherwise, you will get really different results.
>
>BTW, I suspect this difference to be the reason why == is faster than =. The second has to convert the string into logical characters before comparing them.
>

Christof,

Actually SET EXACT ON and = pads the shorter string with spaces before comparing and == comapres the strings normally and then checks to see if they are the same length. If the only difference between two strings is trailing spaces then Exact=ON and = will show them as equal while == will show them as not equal.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform