Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Serious BUG: TYPE(
Message
 
 
À
04/01/2005 07:04:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00974039
Message ID:
00974102
Vues:
26
Fabio,

It's not a bug, as others have said, it is documented to work the way it does. I'm one that is glad it works this way.

I'd guess the logic behind the design choice was to prevent everyone from having to go back and add V as a possible type test condition in their code:
do case
   case type(...) $ "CM"
      * dealing with a text item
I'm glad I don't have to ferret out all those places in all the code I maintain and change it to CMV

So yes, you'll need to use afields to get the absolute column type.

>TYPE("someField") return correct type for M,G,.....
>
>For a VarChar it return "C".
>This is documented.
>
>
>CREATE CURSOR bugbug (bug V)
>? TYPE("bug")
>
>
>Now, for knowing if a field is varchar, I must to use AFIELDS() ?
>
>WHY!!!!!!????
>Who can think one similar what?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform