Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How determine if variable is an array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00395400
Message ID:
00395504
Vues:
11
>I'm glad you asked, it prompted me to add ISARRAY to my own code libary like this:
FUNCTION ISARRAY( tcVar)
>RETURN TYPE("tcVar[1]") <> "U"
For ISARRAY() to work you need to pass the variable by reference. For example:
myVar = 3   && a variable
>dimension myArray[1]    && an array
>myArray[1] = 3
>?ISARRAY( @myVar)   && returns .F.
>?ISARRAY( @myArray) && returns .T.
Hi Rick,

You may want to add this function to UT FAQ section.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform