Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting field value
Message
From
01/07/2009 23:06:19
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
01/07/2009 19:15:58
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01409674
Message ID:
01409704
Views:
53
>>>>I prefer not to use macro substitution unless it's necessary and it's not necessary in this case.
>>
>>>I understand why try not to use macro substitution, but why are you saying it is not necessary in this case?
>>
>>You said yourself that EVALUATE(cAlias + [.] + cField) does the job.
>
>I think I misunderstand you.
>I suppose the use EVALUATE() should also be the "only when necessary" case :)

And sometimes it can be avoided too. I'd rather build a script on the fly, textmerging actual field names, and then execscript() it. Unless there are some limitations - few things may be out of scope in such a script - in which case I'd build a class from a generated prg, instantiate it and run its code. This technique saved me a lot of unnecessary conditional code - in one particular case, I managed to get rid of about 40,000 if-endif statements (plus the code between them which would never run), because I could check for them beforehand, and build the code on the fly which simply wouldn't include them at all. Speed gain, about 40x.

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