Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why no data type mismatch?
Message
De
04/05/2000 14:33:42
 
 
À
04/05/2000 13:13:46
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00366194
Message ID:
00366243
Vues:
20
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform