Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check the type of a parameter
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00508539
Message ID:
00508851
Views:
27
Jay,

If tcVariable = "5" then the following code will set lcType to N instead of C. It appears that TYPE tries to evaluate uMyVar then returns the type of the result.

Shane

>
>>   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
>
Shane Murdoch
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform