Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String comparison
Message
From
30/08/2001 14:50:57
 
 
To
30/08/2001 14:43:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00551012
Message ID:
00551034
Views:
20
>>SET EXACT ON (or OFF)
>
>SET EXACT is OFF
>
>I really can't understand why this is not working.

You need SET EXACT ON to get what you expect. From the VFP7 Help file, topic SET EXACT:

>>
Character expressions are compared character for character from left to right until one of the expressions isn't equal to the other, or until the end of the expression on the right side of the = operator is reached (SET EXACT OFF), or until the ends of both expressions are reached (SET EXACT ON).
<<

The same thing applies to the < or > operator, it stops with SET EXACT OFF at the end of the right string, which is shorter.

IOW, since

'MICHEL'='M' = .T.

with SET EXACT OFF

? 'MICHEL'>'M' can't also be .T. since the = and > can't simultaneously be .T.
Jim Saunders
Microsoft
This posting is provided “AS IS”, with no warranties, and confers no rights.
Previous
Reply
Map
View

Click here to load this message in the networking platform