Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find the datatype of a parameter in a function
Message
 
À
31/07/1998 03:10:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00122980
Message ID:
00123033
Vues:
26
>how to find the datatype of a parameter in a function
>
>
> i used type() function , but it takes only character expression as argument . if the parameter passed is numeric then type mismatch occurs , if the parameter is string if I use type(str()) then type mismatch occurs but solves the numeric parameter.
>
> any advice or suggestion would be very helpful.
Staya,

You have to put the expression in quotes for the TYPE() function.

lcVar = "lcVar2"
lcVar2 = 123

?TYPE(lcVar) && returns N becuase lcVar2 is numeric
?TYPE("lcVar") && Returns C because lcVar is character.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform