Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Diff. between TYPE() of object and object.name
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01247740
Message ID:
01247887
Views:
24
>Hi Tore
>
>>Vartype() was introduced after type(), and what I heard was that it was preferrable because it was faster and safer. I think that I once read that there are a few rare cases where vartype() is not recommended, but I am not absolutely sure. Personally I always use vartype().
>
>That is nice to hear, as you have been using it have not encountered a problem with it, then I guess is it safe. Please check out Borislav's response to this thread, I used his codes and added equivalent VARTYPE() calls, the 4th call of TYPE() which return a U, generate an error when replaced by VARTYPE().

VARTYPE() will error if you're checking an object and its property where the object doesn't exist yet, or has been released. It will work for checking just an object, but it doesn't handle the multilevel checking that TYPE() does.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform