Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
0 length string is not recognized ???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00597801
Message ID:
00597804
Views:
12
>Ulises,
>
>I suspect that set('exact') is OFF, which is the default value
>
>OFF: Specifies that, to be equivalent, expressions must match character for character until the end of the expression on the right side is reached
>
>ie
>
>set exact OFF
>? 'xxxxx' = '' && yields TRUE
>
>set exact ON
>? 'xxxx' = '' && yields FALSE
>
>SET EXACT is scoped to the current data session.

Gregory,

Yes, it's Exact Off causing this.
But what do you say; that Exact On need not match character for character in order to give .T. ? {g}

Personally I always work with ON in order to just understand everything what's happening, and obviously set it OFF for the one line of code I need for that. Like Seek (and look for left part of key).

BTW, is there any rule about using " and ' ? I mean, in systems where OFF is the standard, there is difference in the result (i.e. always use " in order to get THE result).
No, I didn't look for it in the VFP Help :-)

Peter

>
>
>>Hi all:
>>I have this very simple code in the Lost Focus event of a field:
>>*SET STEP ON
>>STORE ALLTRIM(THIS.VALUE) TO xValue
>>IF xValue=""
>> RETURN
>>ELSE
>>(Do stuff)
>>ENDIF
>>I am seeing the value of xValue as "xxxxxx", however, the code executes the RETURN command instead of the ELSE part. Why is so?
>>TIA for your time.
>>
>>Ulises
Previous
Reply
Map
View

Click here to load this message in the networking platform