Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I check to see if an array has been created?
Message
De
12/10/2001 00:55:27
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00567404
Message ID:
00567414
Vues:
14
I knew I could count on the UT and most likely you lately. I assume you write code with VFP for a living because you seem to have all the answers. How does that saying go, "You've probably forgotten more than I will ever know". Thanks again Sergey!!

>>I am using an array in a program and on the first pass through a method, it is possible that the array hasn't been created yet (the routine is primarily for subsequent passes). Of course I get an error when I do a ALEN on the non-existant array. I have tried various commands to see if I can check for it but they all generate an error. Is there a command that can tell if an array (or variable of anytype), exists without generating an error?
>
>You can use TYPE() function to do that. Notice quotes around variable name.
>
IF TYPE("myvariable") = "U"
>  * Variable/array myvariable doesn't exist
>ELSE
>  * It exist
>ENDIF
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform