Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting an Array
Message
 
À
18/10/2007 16:25:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01261965
Message ID:
01261976
Vues:
23
>I VFP 9 one can employ TYPE(cExpression , 1) and it will return "A" if it is an array or collection.
>
>How can I detect an array in VFP 7?
>I tried setting a private to some value with an ON ERROR routine and then subject the variable to the ALEN() function. However, the ON ERROR routine does not fire, rather processing goes directly to the error event instead.
>
>I also tried
>
>IF TYPE("toObject."+lcProp+"[1,1]") = [U]
>  ....
>
>But it still returns "C" for character variables that are not arrays.
>
>
>Any ideas?

I can't test this, but in VFP8 (that is the oldest version I have), I got this:
LOCAL laTest[1]
LOCAL lcTest

? TYPE("latest[1]") && L
? TYPE("lctest[1]") && U
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform