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 16:38:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00567404
Message ID:
00567964
Vues:
13
>You can ran into a slight problem if using type() if the parameter is a form property. For example, run any form and type in the command window:

Some interesting things:
oX = NEWOBJECT('form')
?TYPE("oX.top[0]")
?TYPE("oX.top[1]")

DIMENSION xx[1]
?TYPE("xx[0]")
?TYPE("xx[1]")

oX.AddProperty('aA[1]')
?TYPE("oX.aA[0]")
?TYPE("oX.aA[1]")
So, to test if a variable or property is an array:
llArray = TYPE("array[0]") = 'U' AND TYPE("array[1]") <> 'U'
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform