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:
00508826
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform