Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tell if variable or field
Message
De
10/04/2008 14:26:37
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01309758
Message ID:
01309767
Vues:
6
>>>There is a variable or field:
>>>
>>>
>>>m.NewValue = MyUnknownVariableOrField
>>>
>>>
>>>How can I tell if MyUnknownVariableOrField is a variable or a field?
>>
>>Add a m., and use vartype().
>>If vartype(yourunknown)#'U' and vartype(m.yourunknown)='U'
>>*  yourunknown is a field
>>else
>>*  yourunknown is a memvar
>>Endif
>
>Interesting solution.

It's not 100% safe, it will also report that an object is a field.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform