Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Big Problem with simple code
Message
 
À
08/09/2005 03:22:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01047265
Message ID:
01047813
Vues:
7
Hi Fabio,

Your example code...
SET EXACT OFF
?'Domestic Chassis LED '== 'Domestic Chassis LED'	&& .F.

SET EXACT ON
?'Domestic Chassis LED '= 'Domestic Chassis LED'	&& .T.
...makes your point very well. If I had given these examples as well in my earlier post, it would have been more informative as to the differences. Thank you for the additional clarification.

>>I'm not sure I understand your point now. Are you contending that there is a flaw in the information I provided in this thread? If so, what would be the part that you are taking issue with as it relates to the original poster's problem? As you and I both know, the SET ANSI setting has nothing to do with whether...
>>
>>?'Domestic Chassis LED' = 'Domestic Chassis'
>>
>>...returns .T. or not, and in the same way it has nothing to do with the comparisons that the original poster is doing in the DO CASE statement. While, the SET EXACT setting does effect the return value, which is precisely why I used it. Furthermore, while SET ANSI does not override the SET EXACT setting for the code given, "==" does in fact override it, which is why I presented "==" as well. If I am missing something here, or you believe me to be in error, please correct me.
>>
>
>I known you are a precise man,
>then I allow me to make the pedant.
>
>You have written:
>
>
>SET EXACT OFF
>?'Domestic Chassis LED' = 'Domestic Chassis' && .T. -- only len('Domestic Chassis') is checked to see if it matches
>?'Domestic Chassis' = 'Domestic Chassis LED' && .F.
>
>?'Domestic Chassis LED' == 'Domestic Chassis' && .F.
>?'Domestic Chassis' == 'Domestic Chassis LED' && .F.
>
>SET EXACT ON
>?'Domestic Chassis LED' = 'Domestic Chassis' && .F.
>?'Domestic Chassis' = 'Domestic Chassis LED' && .F.
>
>

>with this, it is not clear that Set EXACT ON is different from "== ".
>
>
>CLEAR
>SET EXACT OFF
>?'Domestic Chassis LED' = 'Domestic Chassis'            && .T.
>?'Domestic Chassis'     = 'Domestic Chassis LED'        && .F.
>?'Domestic Chassis LED '= 'Domestic Chassis LED'	&& .T.
>
>?'Domestic Chassis LED' == 'Domestic Chassis'		&& .F.
>?'Domestic Chassis'	== 'Domestic Chassis LED'	&& .F.
>?'Domestic Chassis LED '== 'Domestic Chassis LED'	&& .F.
>
>
>SET EXACT ON
>?'Domestic Chassis LED'	= 'Domestic Chassis'		&& .F.
>?'Domestic Chassis'	= 'Domestic Chassis LED'	&& .F.
>?'Domestic Chassis LED '= 'Domestic Chassis LED'	&& .T.
>
>
>SET ANSI I have put only her in discussion for completeness.
>
>Another difference is :
>
>XBASE "=" respect COLLATE but "==" use MACHINE only
>SQL   "=" and "==" respect COLLATE
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform