Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String comparison
Message
De
30/08/2001 14:50:57
 
 
À
30/08/2001 14:43:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00551012
Message ID:
00551034
Vues:
21
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform