Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find the datatype of a parameter in a function
Message
 
To
31/07/1998 03:10:48
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00122980
Message ID:
00123033
Views:
27
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform