Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VARTYPE vs TYPE with Parent property
Message
 
 
À
25/07/2002 16:21:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00682266
Message ID:
00682780
Vues:
39
>>>Hi Nancy,
>>>
>>>>For objects, one should be careful about checking just whether their type is "O". It's safer to check a property, say "Name", if it will have one, or add !ISNULL() to the check.
>>>
>>>I've heard this before, but don't remember why it makes a difference. Could you enlighten me?
>>>
>>>TIA
>>
>>The property type could be "O" for property value of Null which means that property doesn't reference any object.
>
>Hi Sergey,
>How can you create a variable that has a type of 'O' but a value of Null?

Hi Bill,

Foxpro keeps the variable type when you assign Null value to it.
myvar = Createobject("Line")
? Type("myvar"), VarType(myvar)
myvar = Null
? Type("myvar"), VarType(myvar)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform