Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check the type of a parameter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00508539
Message ID:
00508826
Vues:
22
Shane --

> There is a problem with this method. If tcVariable = "5" or tcVariable = ".T." TYPE(tcVariable) returns N and L instead of U.

Were I using the routine, I'd want to know the difference between a value and a variable embedded in a variable. Perhaps this isn't your requirement.

Would it help to modify as follows? Then you'd pass the value of the underlying value through.
>   lcType = TYPE ("tcVariable")
>   IF lcType = "C"
>      IF TYPE (tcVariable) <> "U"   &&  a variable could refer to any type
>           lcType = TYPE (tcVariable) &&  return the variable's variable type.
>      ENDIF
>   ENDIF
If doesn't hit the mark, let us know what your specific requirements are.

Enjoy!

Jay
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform