Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tell if variable or field
Message
 
À
10/04/2008 15:37:54
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:
01309800
Vues:
7
>>>>>I don't see a problem with the object here. For me this looks like a safe code.
>>>>
>>>>
>>>>yourunknown = CREATEOBJECT([EMPTY])
>>>>? VARTYPE(m.yourunknown)
>>>>
>>>>
>>>>Just because objects are memory variables also.
>>>
>>>Right, it would be O, I think. So, what is the problem with the code above? vartype(m.unknown) = 'O', so it's not a field.
>>>
>>>vartype(unknown) <> "U" and vartype(m.unknown) = 'U'
>>>  This is a field - no exceptions except for the case of select m as an alias
>>
>>Maybe, I'm not sure right now, but if you said so, it should work.
>>I used Tore's code always WHEN I use with CLIPPER.
>>Now I prefer NOT to use variables with the same name as fields :-)
>
>It's always easy when it's your own code. :-)

Yep,
But when I start to code I surely will learn the Database first.
That wouldn't preserve me from some suddenly created cursors of course :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform