Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Substition Idea
Message
From
24/02/2006 19:19:33
 
 
To
24/02/2006 17:59:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01098713
Message ID:
01099113
Views:
14
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform