Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
how to determine if a var is = nothing
Message
 
To
06/09/2000 22:22:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00413285
Message ID:
00413405
Views:
20
>Try VARTYPE(myvar) -- if it returns "O" it's an object, if it returns "X", it's NULL

Sorry Guys,

I meant to post this in the VB forum. Doh!

BTW, type("MyObject.Name") = "C" is the best way in VFP. Vartype returns the type of the var, regardless of it's content. So if it was an object and was later set to .null. it still returns "O".

See: Classes - VCX Re: Determining existence of an object Thread #251780 Message #251909
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform