Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro Substition Idea
Message
De
24/02/2006 19:19:33
 
 
À
24/02/2006 17:59:58
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01098713
Message ID:
01099113
Vues:
13
>>but for the particular UC the fastest way is
>>Store (m.cAlias+".AirDate") to dAirDate1
>My favorite is
dAirDate1=evaluate(forceext(cAlias, "Airdate"))
Interesting idea, but my first gut reaction is "oops, wait a minute".
ForceExt() is slower - even compared to
(m.lcStem + "." + m.lcExt)
and eval is also slower - but that will not matter in most of the cases.
You gain safety for the cases the dot is already included in cAlias,
but run a risk if the really intended source is an object property named the same as the object.
lcObjname = "goApp.Here.I.Have.Structures.Airdate"
Store (m.lcObjname+".AirDate") to dAirDate1
Not the best way to build an object hierarchy, and the most UC will probably work of tables or better named objects.
So both differ only in seldom encountered "fringe cases". Still, from the ZEN of a similar language: "Explicit is better than Implicit".

So probably the "best way" is defined by readability for the author.

regards

thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform