Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test If a Variable exists
Message
 
 
To
01/09/2006 08:02:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01150290
Message ID:
01150338
Views:
23
>>My syntax is correct.
>>
>>>The correct syntax is
>>>
>>>
>>>IF VARTYPE(m.SomeVariable) <> "U"
>>>  * Variable exists
>>>
>>>IF VARTYPE(m.SomeObject) == "O"  && this part is useless AND NOT ISNULL(SomeObject)
>>>  * SomeObject is an Object reference
>>>...
>>>
>
>Sorry, it isn't
>
>The variable name does not need quotes for vartype()
>
>VARTYPE("SomeVariable") will always return 'C'

It was a typo. I meant TYPE() not VARTYPE().
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform