Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How tell if its an Array?
Message
 
 
À
05/07/2002 16:59:04
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00675762
Message ID:
00675772
Vues:
13
This message has been marked as the solution to the initial question of the thread.
IF TYPE("laArray[1]") <> "U"    && It's array. 
* The code above doesn't work for array properties.
  
* To check any variables including array property
IF TYPE("ALEN(laArray)") = "N"       && It's array
BTW, you cannot pass array property as parameter because property cannot be passed by reference.

>I need to tell wether a variable is an array or not. If I do :
>
>
>
>DIMENSION laArray(2)
>
>laArray(1) = 'My test'
>laArray(2) = 'My test 2'
>
>?VARTYPE(laArray)
>?VARTYPE(laArray(1)
>
>
>
>I get 'C'. This variable will be passed as an array and I need to know if it is an array. How?
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform