Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox driving me crazy....
Message
De
06/04/2002 23:02:22
Ken Dibble
Southern Tier Independence Center
Binghamton, New York, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00641186
Message ID:
00641898
Vues:
15
Thanks again, Sergey.

>>Thanks, Sergey.
>>
>>I've read in several places that macro substitution should be avoided when possible. Parentheses are used in so many different ways in VFP, and I've never come across a clear explanation of all of their uses.

>
>This particular use of parentheses is called Name Expession. You can find it in the help under Name Expession creating. You can use it anywhere VFP command or function requires that you supply a name. For Example,
lcFrom = "Myfile.txt"
>lcTo = "Newfile.txt"
>COPY FILE (lcFrom) TO (lcTo)
>However, it does surprise me that a function call like EVAL() would be significantly faster than a macro.
>
>The macro substitution is slow because Foxpro has to parse it at runtime to find out what it represents. When you use EVAL() or Name Expression Foxpro knows what to do w/o additional processing.
>
>>Does DO CASE add speed also, or just a sort of logical readability?
>
>Both.
>
>>Doesn't the engine have to evaluate the entire DO CASE structure when it encounters it, whereas it need only look at the first line of each IF statement?
>
>No, only the CASE conditions're evaluated until found one that evaluates to True. The rest of the conditions are not checked. You can speed up DO CASE by moving conditions that most likely to evaluates to True to the top of the structure.
>
>
>< snip >
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform