Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public object with array...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00513702
Message ID:
00516283
Views:
9
Jim,

That's right, but the original question was about ascan command. How can we ensure, that ascan would find the exact match?

Thanks in advance.

>>Check set exact settings. Better set it on and use Exact Name match to check.
>
>Nadia,
>
>This si not correct. SET EXACT ON does NOT>
>
>lcVar1 = "Smith     "
>lcVar2 = "Smi"
>
>SET EXACT OFF
>?lcVar2 = lcVar1 && .T.
>
>SET EXACT ON
>?lcVar2 = lcVar1 && .F.
>
>* Now the trouble
>lcVar1 = "Smith     " && Note trailing spaces
>lcVar2 = "Smith"
>
>SET EXACT OFF
>?lcVar2 = lcVar1 && .T.
>
>SET EXACT ON
>?lcVar2 = lcVar1 && .T.  These report as being equal and they are not
>
>* Now the real exact mathcing
>?lcVar2 == lcVar1 && .F. And this is always correct even with exact set off
>
>
>The conclusion, if you want exact string matching use the == and do not depend on SET EXACT ON. Leave SET EXACT OFF always.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform