Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why no data type mismatch?
Message
From
04/05/2000 14:33:42
 
 
To
04/05/2000 13:13:46
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00366194
Message ID:
00366243
Views:
21
>>SEEK 1 IN MyTable ORDER PK
>>SEEK "1" IN MyTable ORDER PK
>
>>Both work. What gives?
>
>This misfeature is relabelled a "convenience"
>
>...at least until the developers decide at some future date that it's sloppy and they make the second usage illegal.
>
>Just curious, how did you discover this?

Just how you might imagine. I was retrieving a PK from a URL, and forgot to convert it to numeric using VAL(), and it worked. It caught me later when I tried to perform a STR() on the value to pass it on.

I'm just wondering how I got this ar without ever noticing this "feature".

FWIW, I only consider it a misfeature because VFP doesn't do implicit type conversions elsewhere (ala VB). I like implicit type conversions, it keeps your code from being litterd with ALLTRIM(STR()), TRANSFORM(), VAL(), and soforth, but this the fact that this case is so isolated makes it a 'misfeature', IMO.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform