Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check for not defined variable
Message
 
 
À
12/04/2007 21:48:23
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01215370
Message ID:
01215371
Vues:
16
>Hi,
>If a variable not defined in runtime, it will cause an error during
>runtime.
>How to check a variable not defined in runtime ?
>
>Thanks.

if vartype(m.myVariable) = 'U' && this variable is not defined

For object properties you may use PEMSTATUS function and if you want to check if a variable is an array, you may try
if type('myArray[1]') = 'U' && myArray is not an array
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform