Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can someone explain why macro needs to have 2 dots?
Message
De
19/02/2007 19:48:52
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01196999
Message ID:
01197177
Vues:
17
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform