Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting field value
Message
De
01/07/2009 23:06:19
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
01/07/2009 19:15:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01409674
Message ID:
01409704
Vues:
52
>>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform