Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00180248
Message ID:
00180385
Views:
14
>The double equal sign in VFP is the direct equivalent of SETting EXACT ON and then OFF again.

George,

No it isn't :-).

SET EXACT ON will pad the shorter string with spaces to be equal length to the longer and then compare them like the set exact off does. The double equal sign compares the strigns like set exact off and then checks to see if they are the same length, for example;
lcVar1 = "Smith     "
lcVar2 = "Smith"
SET EXACT ON
? lcVar1 = lcVar2 && .T.
? lcVar1 == lcVar2 && .F.
If you need exact equality in string comparison, then the only way to get it is with ==.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform