Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vartype: behavior
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00136852
Message ID:
00137649
Vues:
56
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform