Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check if a variable is an array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00524483
Message ID:
00524485
Vues:
13
>I have some code which collects an array as a parameter. Some rogue piece of code is passing something else. The code copes when run via fox but dies through the app.
>
>The build app function tells me (through errors) that it's there but not where to find it.
>
>How do I check if the parameter is an array and suspend if it's not? Type() doesn't work.
>
>Sarah

There is a sample code that shows how to check if parameter is an array
Function Myfunction
Lparameter taMyarray
IF Type("taMyarray[1]") = "U"
    * It's not array
    Wait Wind "Not Array"
ELSE
    * it's array
    Wait Wind "Array"
ENDIF
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform