Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vartype: behavior
Message
From
30/09/1998 09:45:41
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00136852
Message ID:
00142356
Views:
36
>>How are we supposed to know what is treated as a variable, and what constitutes an expression? The cases where some arithmetic is involved are obvious, but when is VarType() treating object.property, object.member and object.member.property as an expression, and when as a variable? There must be a general rule to this. I'll simply add it to my Brain.Fox.Map and use it further on.
>
>The key is not to rely on VARTYPE() with an object.property if you are not sure that object.property doesn't exist. Use TYPE() for those cases. The only real case that VARTYPE() with return a "U" without a runtime error for an unknown object.property is:
>
>x=newobject("custom")
>? vartype(x.foo) && returns "U"
>
>But in this case above, I would still use TYPE() if I was not certain property foo existed.

Thanks. Mapped.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform