Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find the datatype of a parameter in a function
Message
From
31/07/1998 03:27:19
 
 
To
31/07/1998 03:13:07
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00122980
Message ID:
00122982
Views:
15
I am writing a function which takes any data type as the parameter.

Now in that function I have to check what is that parameter data type, do some manipulation and return the data in the same data type as passed.


eg :

Funct typeofvar
param myvar

if type(str(myvar)) = 'N' then
? 'numeric'
return type(myvar)
else
if type(mvar) ='C' then
? 'charecter'
return type(myvar)
endif
endif

return

**************
**Main Prog

=myfun('12')
=myfun(12)
******* end of prog

the main problem lies with type of data passed
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform