Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vartype: behavior
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00136852
Message ID:
00137649
Views:
55
There's one more thing you have to be very careful of with VARTYPE.

Checking for compound objects may cause errors to occur with VARTYPE()
where TYPE() returns just "U". For example if you have an object
reference like:
VARTYPE(oObject.oSubObject.cValue)
and oSubObject is not an object VARTYPE will cause an error.

This is unfortunate, but expected since VARTYPE treats the expression, well as an expression that may fail. While non-existing single (non . vars) will generate "U" results, VARTYPE() will cause an error.

IOW, you can use VARTYPE() in this situation only if you know at
the very least that all objects actually exist and will return
some sort of type or NULL.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform