This is not true in all cases. For example:
ox = CREATEOBJECT("custom")
? VARTYPE(ox.oNoObject) && This will return "U" as expected
? VARTYPE(ox.oNoObject.cNoProperty) && Returns an error
As long as an object reference exists for a property (or another object) VARTYPE() will not create an error. In the latter case, you would have to use TYPE().
>If the variable doesn't exist, VATYPE() smokes with a
Variable "whatever" not found, so if the variable might not exist, or might be out of scope, TYPE() is still preferable.
- Jeff