Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test If a Variable exists
Message
 
 
To
01/09/2006 08:23:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01150290
Message ID:
01150337
Views:
29
Yes,
It was a typo in my post. It should be TYPE() function. Sorry about that.
IF TYPE("SomeVariable") <> "U"
  * Variable exists

IF TYPE("SomeObject") = "O" AND NOT ISNULL(SomeObject)
  * Object exists
>
>>>My syntax is correct.
>>>
>>Sorry, it isn't
>>The variable name does not need quotes for vartype()
>>VARTYPE("SomeVariable") will always return 'C'
>
>Gregory and Fabio are right, Sergey!
>It's documented as they say. And I tested it.
>The quotes are used if using TYPE().
>And documentation says that VARTYPE() is faster than TYPE().
>
>Many thanks to both of you.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform