Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test If a Variable exists
Message
De
01/09/2006 01:54:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01150290
Message ID:
01150301
Vues:
22
This message has been marked as the solution to the initial question of the thread.
>
>IF VARTYPE("SomeVariable") <> "U"
>  * Variable exists
>
>IF VARTYPE("SomeObject") = "O" AND NOT ISNULL(SomeObject)
>  * Object exists
>...
>
>

This is the TYPE() syntax

The correct syntax is
IF VARTYPE(m.SomeVariable) <> "U"
  * Variable exists

IF VARTYPE(m.SomeObject) == "O"  && this part is useless AND NOT ISNULL(SomeObject)
  * SomeObject is an Object reference
...
>>I have in mind that VFP has a function to test if a variable or object exist. I'm trying to locate it in the help file but I can't.
>>Any help will be appreciated.
>>Thanks in advance.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform