Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Padded strings
Message
 
To
04/01/2002 10:59:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00600660
Message ID:
00600835
Views:
21
>I get .F., .T., for the first two comparisons.
Yeah I had them backwards.

The string comparison rules are;
SET EXACT OFF
1. The strings are considered equal
2. The strings are compared one character at a time
3. If a mismatched character is hit they are considered unequal
4. The comparison stops when the string on the right side of the = is exhausted

SET EXACT ON
1.  The shorter of the two strings is padded on the right with spaces to be
    equal in length to the longer

the rest of the comparison is the same as SET EXACT OFF

==
The string are compared the same as as set exact off, plus
5. If the strings are still equal their lengths are compared and the result is 
   returned
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform