Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can someone explain why macro needs to have 2 dots?
Message
From
19/02/2007 19:48:52
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01196999
Message ID:
01197177
Views:
19
>VFP 9 help says "Returns the current value for a property or program code for an event or method at design time" and says the return value is "Character, Currency, Date, DateTime, Numeric, or Logical." So it's not obvious - and, technically, not documented - that you can get an object reference. And, for instance, a container is not a property of a form, it would be an object placed on a form and a property of the container would be something like cnt.Width.

OTOH, the function which gets PEMs into an array is called aMembers(), not aPEMs, and it gives you various PEMs and member objects.

So while the help is inconsistent there, the predecessor of GetPem() function has returned objects before... well, at least their names, along with other properties.

To me, getPem() returning an object is equally non-obvious as a cryptic macro expansion. And if we assign this object to a properly prefixed local variable, it's even more readable than a macro or an eval() call.

But then, de gustibus non est disputandum.

back to same old

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

Click here to load this message in the networking platform